aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/toshiba_acpi.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-02-10 18:07:48 -0500
committerRichard Purdie <rpurdie@rpsys.net>2007-02-20 04:26:53 -0500
commit599a52d12629394236d785615808845823875868 (patch)
tree4e2dfa3a25ce761be0ecc0490acabac553f77a67 /drivers/acpi/toshiba_acpi.c
parent321709c5994f952b78d567fd7083dbebbdc381b7 (diff)
backlight: Separate backlight properties from backlight ops pointers
Per device data such as brightness belongs to the indivdual device and should therefore be separate from the the backlight operation function pointers. This patch splits the two types of data and allows simplifcation of some code. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/acpi/toshiba_acpi.c')
-rw-r--r--drivers/acpi/toshiba_acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index efc3669a84e8..3906d47b9783 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -315,7 +315,7 @@ static int set_lcd(int value)
315 315
316static int set_lcd_status(struct backlight_device *bd) 316static int set_lcd_status(struct backlight_device *bd)
317{ 317{
318 return set_lcd(bd->props->brightness); 318 return set_lcd(bd->props.brightness);
319} 319}
320 320
321static unsigned long write_lcd(const char *buffer, unsigned long count) 321static unsigned long write_lcd(const char *buffer, unsigned long count)
@@ -533,10 +533,9 @@ static acpi_status __exit remove_device(void)
533 return AE_OK; 533 return AE_OK;
534} 534}
535 535
536static struct backlight_properties toshiba_backlight_data = { 536static struct backlight_ops toshiba_backlight_data = {
537 .get_brightness = get_lcd, 537 .get_brightness = get_lcd,
538 .update_status = set_lcd_status, 538 .update_status = set_lcd_status,
539 .max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1,
540}; 539};
541 540
542static void __exit toshiba_acpi_exit(void) 541static void __exit toshiba_acpi_exit(void)
@@ -596,6 +595,7 @@ static int __init toshiba_acpi_init(void)
596 toshiba_backlight_device = NULL; 595 toshiba_backlight_device = NULL;
597 toshiba_acpi_exit(); 596 toshiba_acpi_exit();
598 } 597 }
598 toshiba_backlight_device->props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
599 599
600 return (ACPI_SUCCESS(status)) ? 0 : -ENODEV; 600 return (ACPI_SUCCESS(status)) ? 0 : -ENODEV;
601} 601}