diff options
Diffstat (limited to 'drivers/misc/sony-laptop.c')
-rw-r--r-- | drivers/misc/sony-laptop.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index cabbed0015e4..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) | |||
384 | static int sony_backlight_update_status(struct backlight_device *bd) | 384 | static 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 | ||
390 | static int sony_backlight_get_brightness(struct backlight_device *bd) | 390 | static int sony_backlight_get_brightness(struct backlight_device *bd) |
@@ -398,11 +398,9 @@ static int sony_backlight_get_brightness(struct backlight_device *bd) | |||
398 | } | 398 | } |
399 | 399 | ||
400 | static struct backlight_device *sony_backlight_device; | 400 | static struct backlight_device *sony_backlight_device; |
401 | static struct backlight_properties sony_backlight_properties = { | 401 | static struct backlight_ops sony_backlight_ops = { |
402 | .owner = THIS_MODULE, | ||
403 | .update_status = sony_backlight_update_status, | 402 | .update_status = sony_backlight_update_status, |
404 | .get_brightness = sony_backlight_get_brightness, | 403 | .get_brightness = sony_backlight_get_brightness, |
405 | .max_brightness = SONY_MAX_BRIGHTNESS - 1, | ||
406 | }; | 404 | }; |
407 | 405 | ||
408 | /* | 406 | /* |
@@ -484,15 +482,19 @@ static int sony_acpi_add(struct acpi_device *device) | |||
484 | if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) { | 482 | if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) { |
485 | sony_backlight_device = backlight_device_register("sony", NULL, | 483 | sony_backlight_device = backlight_device_register("sony", NULL, |
486 | NULL, | 484 | NULL, |
487 | &sony_backlight_properties); | 485 | &sony_backlight_ops); |
488 | 486 | ||
489 | if (IS_ERR(sony_backlight_device)) { | 487 | if (IS_ERR(sony_backlight_device)) { |
490 | printk(LOG_PFX "unable to register backlight device\n"); | 488 | printk(LOG_PFX "unable to register backlight device\n"); |
491 | sony_backlight_device = NULL; | 489 | sony_backlight_device = NULL; |
492 | } else | 490 | } else { |
493 | sony_backlight_properties.brightness = | 491 | sony_backlight_device->props.brightness = |
494 | sony_backlight_get_brightness | 492 | sony_backlight_get_brightness |
495 | (sony_backlight_device); | 493 | (sony_backlight_device); |
494 | sony_backlight_device->props.max_brightness = | ||
495 | SONY_MAX_BRIGHTNESS - 1; | ||
496 | } | ||
497 | |||
496 | } | 498 | } |
497 | 499 | ||
498 | if (sony_snc_pf_add()) | 500 | if (sony_snc_pf_add()) |