aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ibm_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/ibm_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/ibm_acpi.c')
-rw-r--r--drivers/acpi/ibm_acpi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
index accf4f7da889..4cc534e36e81 100644
--- a/drivers/acpi/ibm_acpi.c
+++ b/drivers/acpi/ibm_acpi.c
@@ -1701,13 +1701,12 @@ static int brightness_write(char *buf)
1701 1701
1702static int brightness_update_status(struct backlight_device *bd) 1702static int brightness_update_status(struct backlight_device *bd)
1703{ 1703{
1704 return brightness_set(bd->props->brightness); 1704 return brightness_set(bd->props.brightness);
1705} 1705}
1706 1706
1707static struct backlight_properties ibm_backlight_data = { 1707static struct backlight_ops ibm_backlight_data = {
1708 .get_brightness = brightness_get, 1708 .get_brightness = brightness_get,
1709 .update_status = brightness_update_status, 1709 .update_status = brightness_update_status,
1710 .max_brightness = 7,
1711}; 1710};
1712 1711
1713static int brightness_init(void) 1712static int brightness_init(void)
@@ -1719,6 +1718,8 @@ static int brightness_init(void)
1719 return PTR_ERR(ibm_backlight_device); 1718 return PTR_ERR(ibm_backlight_device);
1720 } 1719 }
1721 1720
1721 ibm_backlight_device->props.max_brightness = 7;
1722
1722 return 0; 1723 return 0;
1723} 1724}
1724 1725