diff options
Diffstat (limited to 'drivers/video/backlight/jornada720_bl.c')
-rw-r--r-- | drivers/video/backlight/jornada720_bl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c index db9071fc5665..2f177b3a4885 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 = { | |||
101 | 101 | ||
102 | static int jornada_bl_probe(struct platform_device *pdev) | 102 | static int jornada_bl_probe(struct platform_device *pdev) |
103 | { | 103 | { |
104 | struct backlight_properties props; | ||
104 | int ret; | 105 | int ret; |
105 | struct backlight_device *bd; | 106 | struct backlight_device *bd; |
106 | 107 | ||
107 | bd = backlight_device_register(S1D_DEVICENAME, &pdev->dev, NULL, &jornada_bl_ops); | 108 | memset(&props, 0, sizeof(struct backlight_properties)); |
109 | props.max_brightness = BL_MAX_BRIGHT; | ||
110 | bd = backlight_device_register(S1D_DEVICENAME, &pdev->dev, NULL, | ||
111 | &jornada_bl_ops, &props); | ||
108 | 112 | ||
109 | if (IS_ERR(bd)) { | 113 | if (IS_ERR(bd)) { |
110 | ret = PTR_ERR(bd); | 114 | ret = PTR_ERR(bd); |
@@ -117,7 +121,6 @@ static int jornada_bl_probe(struct platform_device *pdev) | |||
117 | /* note. make sure max brightness is set otherwise | 121 | /* note. make sure max brightness is set otherwise |
118 | you will get seemingly non-related errors when | 122 | you will get seemingly non-related errors when |
119 | trying to change brightness */ | 123 | trying to change brightness */ |
120 | bd->props.max_brightness = BL_MAX_BRIGHT; | ||
121 | jornada_bl_update_status(bd); | 124 | jornada_bl_update_status(bd); |
122 | 125 | ||
123 | platform_set_drvdata(pdev, bd); | 126 | platform_set_drvdata(pdev, bd); |