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