diff options
Diffstat (limited to 'drivers/video/backlight/omap1_bl.c')
-rw-r--r-- | drivers/video/backlight/omap1_bl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c index a3a7f8938175..333d28e6b062 100644 --- a/drivers/video/backlight/omap1_bl.c +++ b/drivers/video/backlight/omap1_bl.c | |||
@@ -132,6 +132,7 @@ static const struct backlight_ops omapbl_ops = { | |||
132 | 132 | ||
133 | static int omapbl_probe(struct platform_device *pdev) | 133 | static int omapbl_probe(struct platform_device *pdev) |
134 | { | 134 | { |
135 | struct backlight_properties props; | ||
135 | struct backlight_device *dev; | 136 | struct backlight_device *dev; |
136 | struct omap_backlight *bl; | 137 | struct omap_backlight *bl; |
137 | struct omap_backlight_config *pdata = pdev->dev.platform_data; | 138 | struct omap_backlight_config *pdata = pdev->dev.platform_data; |
@@ -143,7 +144,10 @@ static int omapbl_probe(struct platform_device *pdev) | |||
143 | if (unlikely(!bl)) | 144 | if (unlikely(!bl)) |
144 | return -ENOMEM; | 145 | return -ENOMEM; |
145 | 146 | ||
146 | dev = backlight_device_register("omap-bl", &pdev->dev, bl, &omapbl_ops); | 147 | memset(&props, 0, sizeof(struct backlight_properties)); |
148 | props.max_brightness = OMAPBL_MAX_INTENSITY; | ||
149 | dev = backlight_device_register("omap-bl", &pdev->dev, bl, &omapbl_ops, | ||
150 | &props); | ||
147 | if (IS_ERR(dev)) { | 151 | if (IS_ERR(dev)) { |
148 | kfree(bl); | 152 | kfree(bl); |
149 | return PTR_ERR(dev); | 153 | return PTR_ERR(dev); |
@@ -160,7 +164,6 @@ static int omapbl_probe(struct platform_device *pdev) | |||
160 | omap_cfg_reg(PWL); /* Conflicts with UART3 */ | 164 | omap_cfg_reg(PWL); /* Conflicts with UART3 */ |
161 | 165 | ||
162 | dev->props.fb_blank = FB_BLANK_UNBLANK; | 166 | dev->props.fb_blank = FB_BLANK_UNBLANK; |
163 | dev->props.max_brightness = OMAPBL_MAX_INTENSITY; | ||
164 | dev->props.brightness = pdata->default_intensity; | 167 | dev->props.brightness = pdata->default_intensity; |
165 | omapbl_update_status(dev); | 168 | omapbl_update_status(dev); |
166 | 169 | ||