Add patches accepted for 2.6.26-rc1
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.21-rc1 / 0004-backlight-Separate-backlight-properties-from-backlight-ops-pointers.txt
blob24e019e593d6a1197da9f48e26994a4e59bb038b
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>
12 ---
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)
23  {
24 -       return brightness_set(bd->props->brightness);
25 +       return brightness_set(bd->props.brightness);
26  }
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,
33  };
35  static int brightness_init(void)
36 @@ -1719,6 +1718,8 @@ static int brightness_init(void)
37                 return PTR_ERR(ibm_backlight_device);
38         }
40 +        ibm_backlight_device->props.max_brightness = 7;
42         return 0;
43  }
45 -- 
46 1.4.4.4