Thermal: Allow first cooling device update
Alex Frid [Fri, 28 Dec 2012 02:17:29 +0000 (18:17 -0800)]
To allow first update of cooling device state during registration,
initialized "updated" device field as "false" (instead of "true").

Change-Id: Ie52f2c544f9351b2977578ca6a1af69e8affaea3
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/174576
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

drivers/thermal/thermal_sys.c

index f2d757e..5c8441b 100644 (file)
@@ -1294,7 +1294,7 @@ thermal_cooling_device_register(char *type, void *devdata,
        mutex_init(&cdev->lock);
        INIT_LIST_HEAD(&cdev->thermal_instances);
        cdev->ops = ops;
-       cdev->updated = true;
+       cdev->updated = false;
        cdev->device.class = &thermal_class;
        cdev->devdata = devdata;
        dev_set_name(&cdev->device, "cooling_device%d", cdev->id);