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/wm831x_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/wm831x_bl.c')
-rw-r--r-- | drivers/video/backlight/wm831x_bl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c index 467bdb7efb23..08fd87f3aecc 100644 --- a/drivers/video/backlight/wm831x_bl.c +++ b/drivers/video/backlight/wm831x_bl.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/fb.h> | 14 | #include <linux/fb.h> |
15 | #include <linux/backlight.h> | 15 | #include <linux/backlight.h> |
16 | #include <linux/slab.h> | ||
16 | 17 | ||
17 | #include <linux/mfd/wm831x/core.h> | 18 | #include <linux/mfd/wm831x/core.h> |
18 | #include <linux/mfd/wm831x/pdata.h> | 19 | #include <linux/mfd/wm831x/pdata.h> |
@@ -112,7 +113,7 @@ static int wm831x_backlight_get_brightness(struct backlight_device *bl) | |||
112 | return data->current_brightness; | 113 | return data->current_brightness; |
113 | } | 114 | } |
114 | 115 | ||
115 | static struct backlight_ops wm831x_backlight_ops = { | 116 | static const struct backlight_ops wm831x_backlight_ops = { |
116 | .options = BL_CORE_SUSPENDRESUME, | 117 | .options = BL_CORE_SUSPENDRESUME, |
117 | .update_status = wm831x_backlight_update_status, | 118 | .update_status = wm831x_backlight_update_status, |
118 | .get_brightness = wm831x_backlight_get_brightness, | 119 | .get_brightness = wm831x_backlight_get_brightness, |
@@ -125,6 +126,7 @@ static int wm831x_backlight_probe(struct platform_device *pdev) | |||
125 | struct wm831x_backlight_pdata *pdata; | 126 | struct wm831x_backlight_pdata *pdata; |
126 | struct wm831x_backlight_data *data; | 127 | struct wm831x_backlight_data *data; |
127 | struct backlight_device *bl; | 128 | struct backlight_device *bl; |
129 | struct backlight_properties props; | ||
128 | int ret, i, max_isel, isink_reg, dcdc_cfg; | 130 | int ret, i, max_isel, isink_reg, dcdc_cfg; |
129 | 131 | ||
130 | /* We need platform data */ | 132 | /* We need platform data */ |
@@ -191,15 +193,15 @@ static int wm831x_backlight_probe(struct platform_device *pdev) | |||
191 | data->current_brightness = 0; | 193 | data->current_brightness = 0; |
192 | data->isink_reg = isink_reg; | 194 | data->isink_reg = isink_reg; |
193 | 195 | ||
194 | bl = backlight_device_register("wm831x", &pdev->dev, | 196 | props.max_brightness = max_isel; |
195 | data, &wm831x_backlight_ops); | 197 | bl = backlight_device_register("wm831x", &pdev->dev, data, |
198 | &wm831x_backlight_ops, &props); | ||
196 | if (IS_ERR(bl)) { | 199 | if (IS_ERR(bl)) { |
197 | dev_err(&pdev->dev, "failed to register backlight\n"); | 200 | dev_err(&pdev->dev, "failed to register backlight\n"); |
198 | kfree(data); | 201 | kfree(data); |
199 | return PTR_ERR(bl); | 202 | return PTR_ERR(bl); |
200 | } | 203 | } |
201 | 204 | ||
202 | bl->props.max_brightness = max_isel; | ||
203 | bl->props.brightness = max_isel; | 205 | bl->props.brightness = max_isel; |
204 | 206 | ||
205 | platform_set_drvdata(pdev, bl); | 207 | platform_set_drvdata(pdev, bl); |