diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-02-10 18:07:48 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-02-20 04:26:53 -0500 |
commit | 599a52d12629394236d785615808845823875868 (patch) | |
tree | 4e2dfa3a25ce761be0ecc0490acabac553f77a67 /drivers/acpi/asus_acpi.c | |
parent | 321709c5994f952b78d567fd7083dbebbdc381b7 (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/asus_acpi.c')
-rw-r--r-- | drivers/acpi/asus_acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 906c54f9ba50..b770deab968c 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -848,7 +848,7 @@ out: | |||
848 | 848 | ||
849 | static int set_brightness_status(struct backlight_device *bd) | 849 | static int set_brightness_status(struct backlight_device *bd) |
850 | { | 850 | { |
851 | return set_brightness(bd->props->brightness); | 851 | return set_brightness(bd->props.brightness); |
852 | } | 852 | } |
853 | 853 | ||
854 | static int | 854 | static int |
@@ -1352,10 +1352,9 @@ static int asus_hotk_remove(struct acpi_device *device, int type) | |||
1352 | return 0; | 1352 | return 0; |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | static struct backlight_properties asus_backlight_data = { | 1355 | static struct backlight_ops asus_backlight_data = { |
1356 | .get_brightness = read_brightness, | 1356 | .get_brightness = read_brightness, |
1357 | .update_status = set_brightness_status, | 1357 | .update_status = set_brightness_status, |
1358 | .max_brightness = 15, | ||
1359 | }; | 1358 | }; |
1360 | 1359 | ||
1361 | static void __exit asus_acpi_exit(void) | 1360 | static void __exit asus_acpi_exit(void) |
@@ -1409,6 +1408,7 @@ static int __init asus_acpi_init(void) | |||
1409 | asus_backlight_device = NULL; | 1408 | asus_backlight_device = NULL; |
1410 | asus_acpi_exit(); | 1409 | asus_acpi_exit(); |
1411 | } | 1410 | } |
1411 | asus_backlight_device->props.max_brightness = 15; | ||
1412 | 1412 | ||
1413 | return 0; | 1413 | return 0; |
1414 | } | 1414 | } |