diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/backlight/adx_bl.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/backlight/adx_bl.c')
-rw-r--r-- | drivers/video/backlight/adx_bl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c index 2c3bdfc620b7..7f4a7c30a98b 100644 --- a/drivers/video/backlight/adx_bl.c +++ b/drivers/video/backlight/adx_bl.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/backlight.h> | 13 | #include <linux/backlight.h> |
14 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
15 | #include <linux/gfp.h> | ||
15 | #include <linux/io.h> | 16 | #include <linux/io.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
@@ -56,12 +57,12 @@ static int adx_backlight_get_brightness(struct backlight_device *bldev) | |||
56 | return brightness & 0xff; | 57 | return brightness & 0xff; |
57 | } | 58 | } |
58 | 59 | ||
59 | static int adx_backlight_check_fb(struct fb_info *fb) | 60 | static int adx_backlight_check_fb(struct backlight_device *bldev, struct fb_info *fb) |
60 | { | 61 | { |
61 | return 1; | 62 | return 1; |
62 | } | 63 | } |
63 | 64 | ||
64 | static struct backlight_ops adx_backlight_ops = { | 65 | static const struct backlight_ops adx_backlight_ops = { |
65 | .options = 0, | 66 | .options = 0, |
66 | .update_status = adx_backlight_update_status, | 67 | .update_status = adx_backlight_update_status, |
67 | .get_brightness = adx_backlight_get_brightness, | 68 | .get_brightness = adx_backlight_get_brightness, |
@@ -70,6 +71,7 @@ static struct backlight_ops adx_backlight_ops = { | |||
70 | 71 | ||
71 | static int __devinit adx_backlight_probe(struct platform_device *pdev) | 72 | static int __devinit adx_backlight_probe(struct platform_device *pdev) |
72 | { | 73 | { |
74 | struct backlight_properties props; | ||
73 | struct backlight_device *bldev; | 75 | struct backlight_device *bldev; |
74 | struct resource *res; | 76 | struct resource *res; |
75 | struct adxbl *bl; | 77 | struct adxbl *bl; |
@@ -101,14 +103,15 @@ static int __devinit adx_backlight_probe(struct platform_device *pdev) | |||
101 | goto out; | 103 | goto out; |
102 | } | 104 | } |
103 | 105 | ||
104 | bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, bl, | 106 | memset(&props, 0, sizeof(struct backlight_properties)); |
105 | &adx_backlight_ops); | 107 | props.max_brightness = 0xff; |
108 | bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, | ||
109 | bl, &adx_backlight_ops, &props); | ||
106 | if (!bldev) { | 110 | if (!bldev) { |
107 | ret = -ENOMEM; | 111 | ret = -ENOMEM; |
108 | goto out; | 112 | goto out; |
109 | } | 113 | } |
110 | 114 | ||
111 | bldev->props.max_brightness = 0xff; | ||
112 | bldev->props.brightness = 0xff; | 115 | bldev->props.brightness = 0xff; |
113 | bldev->props.power = FB_BLANK_UNBLANK; | 116 | bldev->props.power = FB_BLANK_UNBLANK; |
114 | 117 | ||