diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-02-10 23:07:48 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-02-20 09:26:53 +0000 |
commit | 599a52d12629394236d785615808845823875868 (patch) | |
tree | 4e2dfa3a25ce761be0ecc0490acabac553f77a67 /drivers/acpi/toshiba_acpi.c | |
parent | 321709c5994f952b78d567fd7083dbebbdc381b7 (diff) | |
download | blackbird-op-linux-599a52d12629394236d785615808845823875868.tar.gz blackbird-op-linux-599a52d12629394236d785615808845823875868.zip |
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.c | 6 |
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) static int set_lcd_status(struct backlight_device *bd) { - return set_lcd(bd->props->brightness); + return set_lcd(bd->props.brightness); } static unsigned long write_lcd(const char *buffer, unsigned long count) @@ -533,10 +533,9 @@ static acpi_status __exit remove_device(void) return AE_OK; } -static struct backlight_properties toshiba_backlight_data = { +static struct backlight_ops toshiba_backlight_data = { .get_brightness = get_lcd, .update_status = set_lcd_status, - .max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1, }; static void __exit toshiba_acpi_exit(void) @@ -596,6 +595,7 @@ static int __init toshiba_acpi_init(void) toshiba_backlight_device = NULL; toshiba_acpi_exit(); } + toshiba_backlight_device->props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1; return (ACPI_SUCCESS(status)) ? 0 : -ENODEV; } |