1 From 599a52d12629394236d785615808845823875868 Mon Sep 17 00:00:00 2001
2 From: Richard Purdie <rpurdie@rpsys.net>
3 Date: Sat, 10 Feb 2007 23:07:48 +0000
4 Subject: backlight: Separate backlight properties from backlight ops pointers
6 Per device data such as brightness belongs to the indivdual device
7 and should therefore be separate from the the backlight operation
8 function pointers. This patch splits the two types of data and
9 allows simplifcation of some code.
11 Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
13 drivers/acpi/ibm_acpi.c | 7 ++++---
14 1 files changed, 4 insertions(+), 3 deletions(-)
16 diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
17 index accf4f7..4cc534e 100644
18 --- a/drivers/acpi/ibm_acpi.c
19 +++ b/drivers/acpi/ibm_acpi.c
20 @@ -1701,13 +1701,12 @@ static int brightness_write(char *buf)
22 static int brightness_update_status(struct backlight_device *bd)
24 - return brightness_set(bd->props->brightness);
25 + return brightness_set(bd->props.brightness);
28 -static struct backlight_properties ibm_backlight_data = {
29 +static struct backlight_ops ibm_backlight_data = {
30 .get_brightness = brightness_get,
31 .update_status = brightness_update_status,
32 - .max_brightness = 7,
35 static int brightness_init(void)
36 @@ -1719,6 +1718,8 @@ static int brightness_init(void)
37 return PTR_ERR(ibm_backlight_device);
40 + ibm_backlight_device->props.max_brightness = 7;