diff options
Diffstat (limited to 'drivers/misc/sony-laptop.c')
-rw-r--r-- | drivers/misc/sony-laptop.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 5a97d3a9d745..7bcb81002dcf 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -1038,7 +1038,11 @@ static int sony_nc_add(struct acpi_device *device) | |||
1038 | goto outinput; | 1038 | goto outinput; |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", &handle))) { | 1041 | if (!acpi_video_backlight_support()) { |
1042 | printk(KERN_INFO DRV_PFX "Sony: Brightness ignored, must be " | ||
1043 | "controlled by ACPI video driver\n"); | ||
1044 | } else if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", | ||
1045 | &handle))) { | ||
1042 | sony_backlight_device = backlight_device_register("sony", NULL, | 1046 | sony_backlight_device = backlight_device_register("sony", NULL, |
1043 | NULL, | 1047 | NULL, |
1044 | &sony_backlight_ops); | 1048 | &sony_backlight_ops); |
@@ -1920,7 +1924,6 @@ static int sonypi_misc_fasync(int fd, struct file *filp, int on) | |||
1920 | 1924 | ||
1921 | static int sonypi_misc_release(struct inode *inode, struct file *file) | 1925 | static int sonypi_misc_release(struct inode *inode, struct file *file) |
1922 | { | 1926 | { |
1923 | sonypi_misc_fasync(-1, file, 0); | ||
1924 | atomic_dec(&sonypi_compat.open_count); | 1927 | atomic_dec(&sonypi_compat.open_count); |
1925 | return 0; | 1928 | return 0; |
1926 | } | 1929 | } |
@@ -2315,8 +2318,10 @@ end: | |||
2315 | */ | 2318 | */ |
2316 | static int sony_pic_disable(struct acpi_device *device) | 2319 | static int sony_pic_disable(struct acpi_device *device) |
2317 | { | 2320 | { |
2318 | if (ACPI_FAILURE(acpi_evaluate_object(device->handle, | 2321 | acpi_status ret = acpi_evaluate_object(device->handle, "_DIS", NULL, |
2319 | "_DIS", NULL, NULL))) | 2322 | NULL); |
2323 | |||
2324 | if (ACPI_FAILURE(ret) && ret != AE_NOT_FOUND) | ||
2320 | return -ENXIO; | 2325 | return -ENXIO; |
2321 | 2326 | ||
2322 | dprintk("Device disabled\n"); | 2327 | dprintk("Device disabled\n"); |