aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/backlight/jornada720_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/jornada720_bl.c')
-rw-r--r--drivers/video/backlight/jornada720_bl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
index db9071fc566..2f177b3a488 100644
--- a/drivers/video/backlight/jornada720_bl.c
+++ b/drivers/video/backlight/jornada720_bl.c
@@ -101,10 +101,14 @@ static const struct backlight_ops jornada_bl_ops = {
static int jornada_bl_probe(struct platform_device *pdev)
{
+ struct backlight_properties props;
int ret;
struct backlight_device *bd;
- bd = backlight_device_register(S1D_DEVICENAME, &pdev->dev, NULL, &jornada_bl_ops);
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.max_brightness = BL_MAX_BRIGHT;
+ bd = backlight_device_register(S1D_DEVICENAME, &pdev->dev, NULL,
+ &jornada_bl_ops, &props);
if (IS_ERR(bd)) {
ret = PTR_ERR(bd);
@@ -117,7 +121,6 @@ static int jornada_bl_probe(struct platform_device *pdev)
/* note. make sure max brightness is set otherwise
you will get seemingly non-related errors when
trying to change brightness */
- bd->props.max_brightness = BL_MAX_BRIGHT;
jornada_bl_update_status(bd);
platform_set_drvdata(pdev, bd);