diff options
| -rw-r--r-- | drivers/acpi/video.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 3c9bb85a6a..83aa41c5c5 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
| @@ -409,14 +409,16 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, | |||
| 409 | static int | 409 | static int |
| 410 | acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) | 410 | acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) |
| 411 | { | 411 | { |
| 412 | int status; | 412 | int status = AE_OK; |
| 413 | union acpi_object arg0 = { ACPI_TYPE_INTEGER }; | 413 | union acpi_object arg0 = { ACPI_TYPE_INTEGER }; |
| 414 | struct acpi_object_list args = { 1, &arg0 }; | 414 | struct acpi_object_list args = { 1, &arg0 }; |
| 415 | 415 | ||
| 416 | 416 | ||
| 417 | arg0.integer.value = level; | 417 | arg0.integer.value = level; |
| 418 | status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL); | 418 | if (device->cap._BCM) |
| 419 | 419 | status = acpi_evaluate_object(device->dev->handle, "_BCM", | |
| 420 | &args, NULL); | ||
| 421 | device->brightness->curr = level; | ||
| 420 | printk(KERN_DEBUG "set_level status: %x\n", status); | 422 | printk(KERN_DEBUG "set_level status: %x\n", status); |
| 421 | return status; | 423 | return status; |
| 422 | } | 424 | } |
| @@ -425,11 +427,11 @@ static int | |||
| 425 | acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, | 427 | acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, |
| 426 | unsigned long *level) | 428 | unsigned long *level) |
| 427 | { | 429 | { |
| 428 | int status; | 430 | if (device->cap._BQC) |
| 429 | 431 | return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL, | |
| 430 | status = acpi_evaluate_integer(device->dev->handle, "_BQC", NULL, level); | 432 | level); |
| 431 | 433 | *level = device->brightness->curr; | |
| 432 | return status; | 434 | return AE_OK; |
| 433 | } | 435 | } |
| 434 | 436 | ||
| 435 | static int | 437 | static int |
