summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ibm_acpi.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-02-11 00:07:48 +0100
committerRichard Purdie <rpurdie@rpsys.net>2007-02-20 10:26:53 +0100
commit599a52d12629394236d785615808845823875868 (patch)
tree4e2dfa3a25ce761be0ecc0490acabac553f77a67 /drivers/acpi/ibm_acpi.c
parentbacklight: Clean up pmac_backlight handling (diff)
downloadlinux-599a52d12629394236d785615808845823875868.tar.xz
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/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)
static int brightness_update_status(struct backlight_device *bd)
{
- return brightness_set(bd->props->brightness);
+ return brightness_set(bd->props.brightness);
}
-static struct backlight_properties ibm_backlight_data = {
+static struct backlight_ops ibm_backlight_data = {
.get_brightness = brightness_get,
.update_status = brightness_update_status,
- .max_brightness = 7,
};
static int brightness_init(void)
@@ -1719,6 +1718,8 @@ static int brightness_init(void)
return PTR_ERR(ibm_backlight_device);
}
+ ibm_backlight_device->props.max_brightness = 7;
+
return 0;
}