aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sony-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sony-laptop.c')
-rw-r--r--drivers/misc/sony-laptop.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 03d02bd9f122..2ebe240dd537 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -384,7 +384,7 @@ static void sony_snc_pf_remove(void)
384static int sony_backlight_update_status(struct backlight_device *bd) 384static int sony_backlight_update_status(struct backlight_device *bd)
385{ 385{
386 return acpi_callsetfunc(sony_acpi_handle, "SBRT", 386 return acpi_callsetfunc(sony_acpi_handle, "SBRT",
387 bd->props->brightness + 1, NULL); 387 bd->props.brightness + 1, NULL);
388} 388}
389 389
390static int sony_backlight_get_brightness(struct backlight_device *bd) 390static int sony_backlight_get_brightness(struct backlight_device *bd)
@@ -398,10 +398,9 @@ static int sony_backlight_get_brightness(struct backlight_device *bd)
398} 398}
399 399
400static struct backlight_device *sony_backlight_device; 400static struct backlight_device *sony_backlight_device;
401static struct backlight_properties sony_backlight_properties = { 401static struct backlight_ops sony_backlight_ops = {
402 .update_status = sony_backlight_update_status, 402 .update_status = sony_backlight_update_status,
403 .get_brightness = sony_backlight_get_brightness, 403 .get_brightness = sony_backlight_get_brightness,
404 .max_brightness = SONY_MAX_BRIGHTNESS - 1,
405}; 404};
406 405
407/* 406/*
@@ -483,15 +482,19 @@ static int sony_acpi_add(struct acpi_device *device)
483 if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) { 482 if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) {
484 sony_backlight_device = backlight_device_register("sony", NULL, 483 sony_backlight_device = backlight_device_register("sony", NULL,
485 NULL, 484 NULL,
486 &sony_backlight_properties); 485 &sony_backlight_ops);
487 486
488 if (IS_ERR(sony_backlight_device)) { 487 if (IS_ERR(sony_backlight_device)) {
489 printk(LOG_PFX "unable to register backlight device\n"); 488 printk(LOG_PFX "unable to register backlight device\n");
490 sony_backlight_device = NULL; 489 sony_backlight_device = NULL;
491 } else 490 } else {
492 sony_backlight_properties.brightness = 491 sony_backlight_device->props.brightness =
493 sony_backlight_get_brightness 492 sony_backlight_get_brightness
494 (sony_backlight_device); 493 (sony_backlight_device);
494 sony_backlight_device->props.max_brightness =
495 SONY_MAX_BRIGHTNESS - 1;
496 }
497
495 } 498 }
496 499
497 if (sony_snc_pf_add()) 500 if (sony_snc_pf_add())