aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/wm831x_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/wm831x_bl.c')
-rw-r--r--drivers/video/backlight/wm831x_bl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c
index e32add37a203..a4312709fb1b 100644
--- a/drivers/video/backlight/wm831x_bl.c
+++ b/drivers/video/backlight/wm831x_bl.c
@@ -125,6 +125,7 @@ static int wm831x_backlight_probe(struct platform_device *pdev)
125 struct wm831x_backlight_pdata *pdata; 125 struct wm831x_backlight_pdata *pdata;
126 struct wm831x_backlight_data *data; 126 struct wm831x_backlight_data *data;
127 struct backlight_device *bl; 127 struct backlight_device *bl;
128 struct backlight_properties props;
128 int ret, i, max_isel, isink_reg, dcdc_cfg; 129 int ret, i, max_isel, isink_reg, dcdc_cfg;
129 130
130 /* We need platform data */ 131 /* We need platform data */
@@ -191,15 +192,15 @@ static int wm831x_backlight_probe(struct platform_device *pdev)
191 data->current_brightness = 0; 192 data->current_brightness = 0;
192 data->isink_reg = isink_reg; 193 data->isink_reg = isink_reg;
193 194
194 bl = backlight_device_register("wm831x", &pdev->dev, 195 props.max_brightness = max_isel;
195 data, &wm831x_backlight_ops); 196 bl = backlight_device_register("wm831x", &pdev->dev, data,
197 &wm831x_backlight_ops, &props);
196 if (IS_ERR(bl)) { 198 if (IS_ERR(bl)) {
197 dev_err(&pdev->dev, "failed to register backlight\n"); 199 dev_err(&pdev->dev, "failed to register backlight\n");
198 kfree(data); 200 kfree(data);
199 return PTR_ERR(bl); 201 return PTR_ERR(bl);
200 } 202 }
201 203
202 bl->props.max_brightness = max_isel;
203 bl->props.brightness = max_isel; 204 bl->props.brightness = max_isel;
204 205
205 platform_set_drvdata(pdev, bl); 206 platform_set_drvdata(pdev, bl);