diff options
Diffstat (limited to 'drivers/video/backlight/88pm860x_bl.c')
-rw-r--r-- | drivers/video/backlight/88pm860x_bl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index b8f705cca438..68d2518fadaa 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/backlight.h> | 17 | #include <linux/backlight.h> |
18 | #include <linux/mfd/88pm860x.h> | 18 | #include <linux/mfd/88pm860x.h> |
19 | #include <linux/slab.h> | ||
19 | 20 | ||
20 | #define MAX_BRIGHTNESS (0xFF) | 21 | #define MAX_BRIGHTNESS (0xFF) |
21 | #define MIN_BRIGHTNESS (0) | 22 | #define MIN_BRIGHTNESS (0) |
@@ -187,6 +188,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev) | |||
187 | struct pm860x_backlight_data *data; | 188 | struct pm860x_backlight_data *data; |
188 | struct backlight_device *bl; | 189 | struct backlight_device *bl; |
189 | struct resource *res; | 190 | struct resource *res; |
191 | struct backlight_properties props; | ||
190 | unsigned char value; | 192 | unsigned char value; |
191 | char name[MFD_NAME_SIZE]; | 193 | char name[MFD_NAME_SIZE]; |
192 | int ret; | 194 | int ret; |
@@ -223,14 +225,15 @@ static int pm860x_backlight_probe(struct platform_device *pdev) | |||
223 | return -EINVAL; | 225 | return -EINVAL; |
224 | } | 226 | } |
225 | 227 | ||
228 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
229 | props.max_brightness = MAX_BRIGHTNESS; | ||
226 | bl = backlight_device_register(name, &pdev->dev, data, | 230 | bl = backlight_device_register(name, &pdev->dev, data, |
227 | &pm860x_backlight_ops); | 231 | &pm860x_backlight_ops, &props); |
228 | if (IS_ERR(bl)) { | 232 | if (IS_ERR(bl)) { |
229 | dev_err(&pdev->dev, "failed to register backlight\n"); | 233 | dev_err(&pdev->dev, "failed to register backlight\n"); |
230 | kfree(data); | 234 | kfree(data); |
231 | return PTR_ERR(bl); | 235 | return PTR_ERR(bl); |
232 | } | 236 | } |
233 | bl->props.max_brightness = MAX_BRIGHTNESS; | ||
234 | bl->props.brightness = MAX_BRIGHTNESS; | 237 | bl->props.brightness = MAX_BRIGHTNESS; |
235 | 238 | ||
236 | platform_set_drvdata(pdev, bl); | 239 | platform_set_drvdata(pdev, bl); |