summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/88pm860x_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/88pm860x_bl.c')
-rw-r--r--drivers/video/backlight/88pm860x_bl.c7
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 @@
#include <linux/i2c.h>
#include <linux/backlight.h>
#include <linux/mfd/88pm860x.h>
+#include <linux/slab.h>
#define MAX_BRIGHTNESS (0xFF)
#define MIN_BRIGHTNESS (0)
@@ -187,6 +188,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
struct pm860x_backlight_data *data;
struct backlight_device *bl;
struct resource *res;
+ struct backlight_properties props;
unsigned char value;
char name[MFD_NAME_SIZE];
int ret;
@@ -223,14 +225,15 @@ static int pm860x_backlight_probe(struct platform_device *pdev)
return -EINVAL;
}
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.max_brightness = MAX_BRIGHTNESS;
bl = backlight_device_register(name, &pdev->dev, data,
- &pm860x_backlight_ops);
+ &pm860x_backlight_ops, &props);
if (IS_ERR(bl)) {
dev_err(&pdev->dev, "failed to register backlight\n");
kfree(data);
return PTR_ERR(bl);
}
- bl->props.max_brightness = MAX_BRIGHTNESS;
bl->props.brightness = MAX_BRIGHTNESS;
platform_set_drvdata(pdev, bl);