diff options
author | Dmitry Torokhov <dtor@mail.ru> | 2009-08-29 23:03:16 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-08-29 23:03:16 -0400 |
commit | 4a703a8fe562824f269943d995ddff35077253a9 (patch) | |
tree | 6a076682ff5cfebccbcf725c3d336a754bc457ba /drivers/acpi/video.c | |
parent | 4b4fe3b62e8d88068083218d3e42c45223b51d29 (diff) |
ACPI: video - rename cdev to cooling_dev -- syntax only
Cdev name is normally used for ether class devices or character
devices so rename member to avoid confusion for casual reader
of the code.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index aab385188599..a8432c291f40 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -198,7 +198,7 @@ struct acpi_video_device { | |||
198 | struct acpi_device *dev; | 198 | struct acpi_device *dev; |
199 | struct acpi_video_device_brightness *brightness; | 199 | struct acpi_video_device_brightness *brightness; |
200 | struct backlight_device *backlight; | 200 | struct backlight_device *backlight; |
201 | struct thermal_cooling_device *cdev; | 201 | struct thermal_cooling_device *cooling_dev; |
202 | struct output_device *output_dev; | 202 | struct output_device *output_dev; |
203 | }; | 203 | }; |
204 | 204 | ||
@@ -387,20 +387,20 @@ static struct output_properties acpi_output_properties = { | |||
387 | 387 | ||
388 | 388 | ||
389 | /* thermal cooling device callbacks */ | 389 | /* thermal cooling device callbacks */ |
390 | static int video_get_max_state(struct thermal_cooling_device *cdev, unsigned | 390 | static int video_get_max_state(struct thermal_cooling_device *cooling_dev, unsigned |
391 | long *state) | 391 | long *state) |
392 | { | 392 | { |
393 | struct acpi_device *device = cdev->devdata; | 393 | struct acpi_device *device = cooling_dev->devdata; |
394 | struct acpi_video_device *video = acpi_driver_data(device); | 394 | struct acpi_video_device *video = acpi_driver_data(device); |
395 | 395 | ||
396 | *state = video->brightness->count - 3; | 396 | *state = video->brightness->count - 3; |
397 | return 0; | 397 | return 0; |
398 | } | 398 | } |
399 | 399 | ||
400 | static int video_get_cur_state(struct thermal_cooling_device *cdev, unsigned | 400 | static int video_get_cur_state(struct thermal_cooling_device *cooling_dev, unsigned |
401 | long *state) | 401 | long *state) |
402 | { | 402 | { |
403 | struct acpi_device *device = cdev->devdata; | 403 | struct acpi_device *device = cooling_dev->devdata; |
404 | struct acpi_video_device *video = acpi_driver_data(device); | 404 | struct acpi_video_device *video = acpi_driver_data(device); |
405 | unsigned long long level; | 405 | unsigned long long level; |
406 | int offset; | 406 | int offset; |
@@ -417,9 +417,9 @@ static int video_get_cur_state(struct thermal_cooling_device *cdev, unsigned | |||
417 | } | 417 | } |
418 | 418 | ||
419 | static int | 419 | static int |
420 | video_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state) | 420 | video_set_cur_state(struct thermal_cooling_device *cooling_dev, unsigned long state) |
421 | { | 421 | { |
422 | struct acpi_device *device = cdev->devdata; | 422 | struct acpi_device *device = cooling_dev->devdata; |
423 | struct acpi_video_device *video = acpi_driver_data(device); | 423 | struct acpi_video_device *video = acpi_driver_data(device); |
424 | int level; | 424 | int level; |
425 | 425 | ||
@@ -995,29 +995,29 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
995 | if (result) | 995 | if (result) |
996 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 996 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
997 | 997 | ||
998 | device->cdev = thermal_cooling_device_register("LCD", | 998 | device->cooling_dev = thermal_cooling_device_register("LCD", |
999 | device->dev, &video_cooling_ops); | 999 | device->dev, &video_cooling_ops); |
1000 | if (IS_ERR(device->cdev)) { | 1000 | if (IS_ERR(device->cooling_dev)) { |
1001 | /* | 1001 | /* |
1002 | * Set cdev to NULL so we don't crash trying to | 1002 | * Set cooling_dev to NULL so we don't crash trying to |
1003 | * free it. | 1003 | * free it. |
1004 | * Also, why the hell we are returning early and | 1004 | * Also, why the hell we are returning early and |
1005 | * not attempt to register video output if cooling | 1005 | * not attempt to register video output if cooling |
1006 | * device registration failed? | 1006 | * device registration failed? |
1007 | * -- dtor | 1007 | * -- dtor |
1008 | */ | 1008 | */ |
1009 | device->cdev = NULL; | 1009 | device->cooling_dev = NULL; |
1010 | return; | 1010 | return; |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | dev_info(&device->dev->dev, "registered as cooling_device%d\n", | 1013 | dev_info(&device->dev->dev, "registered as cooling_device%d\n", |
1014 | device->cdev->id); | 1014 | device->cooling_dev->id); |
1015 | result = sysfs_create_link(&device->dev->dev.kobj, | 1015 | result = sysfs_create_link(&device->dev->dev.kobj, |
1016 | &device->cdev->device.kobj, | 1016 | &device->cooling_dev->device.kobj, |
1017 | "thermal_cooling"); | 1017 | "thermal_cooling"); |
1018 | if (result) | 1018 | if (result) |
1019 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 1019 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
1020 | result = sysfs_create_link(&device->cdev->device.kobj, | 1020 | result = sysfs_create_link(&device->cooling_dev->device.kobj, |
1021 | &device->dev->dev.kobj, "device"); | 1021 | &device->dev->dev.kobj, "device"); |
1022 | if (result) | 1022 | if (result) |
1023 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 1023 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
@@ -2020,13 +2020,13 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) | |||
2020 | acpi_video_device_notify); | 2020 | acpi_video_device_notify); |
2021 | sysfs_remove_link(&device->backlight->dev.kobj, "device"); | 2021 | sysfs_remove_link(&device->backlight->dev.kobj, "device"); |
2022 | backlight_device_unregister(device->backlight); | 2022 | backlight_device_unregister(device->backlight); |
2023 | if (device->cdev) { | 2023 | if (device->cooling_dev) { |
2024 | sysfs_remove_link(&device->dev->dev.kobj, | 2024 | sysfs_remove_link(&device->dev->dev.kobj, |
2025 | "thermal_cooling"); | 2025 | "thermal_cooling"); |
2026 | sysfs_remove_link(&device->cdev->device.kobj, | 2026 | sysfs_remove_link(&device->cooling_dev->device.kobj, |
2027 | "device"); | 2027 | "device"); |
2028 | thermal_cooling_device_unregister(device->cdev); | 2028 | thermal_cooling_device_unregister(device->cooling_dev); |
2029 | device->cdev = NULL; | 2029 | device->cooling_dev = NULL; |
2030 | } | 2030 | } |
2031 | video_output_unregister(device->output_dev); | 2031 | video_output_unregister(device->output_dev); |
2032 | 2032 | ||