summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/asus_acpi.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-02-10 23:07:48 +0000
committerRichard Purdie <rpurdie@rpsys.net>2007-02-20 09:26:53 +0000
commit599a52d12629394236d785615808845823875868 (patch)
tree4e2dfa3a25ce761be0ecc0490acabac553f77a67 /drivers/acpi/asus_acpi.c
parent321709c5994f952b78d567fd7083dbebbdc381b7 (diff)
downloadop-kernel-dev-599a52d12629394236d785615808845823875868.zip
op-kernel-dev-599a52d12629394236d785615808845823875868.tar.gz
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 906c54f..b770dea 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -848,7 +848,7 @@ out:
static int set_brightness_status(struct backlight_device *bd)
{
- return set_brightness(bd->props->brightness);
+ return set_brightness(bd->props.brightness);
}
static int
@@ -1352,10 +1352,9 @@ static int asus_hotk_remove(struct acpi_device *device, int type)
return 0;
}
-static struct backlight_properties asus_backlight_data = {
+static struct backlight_ops asus_backlight_data = {
.get_brightness = read_brightness,
.update_status = set_brightness_status,
- .max_brightness = 15,
};
static void __exit asus_acpi_exit(void)
@@ -1409,6 +1408,7 @@ static int __init asus_acpi_init(void)
asus_backlight_device = NULL;
asus_acpi_exit();
}
+ asus_backlight_device->props.max_brightness = 15;
return 0;
}
OpenPOWER on IntegriCloud