]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/video/backlight/omap1_bl.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[mv-sheeva.git] / drivers / video / backlight / omap1_bl.c
index a3a7f893817516aacbfa0da8e4aecf727c671932..d3bc56296c8d98007321a1cce4945c7bdd7e0259 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 #include <linux/backlight.h>
+#include <linux/slab.h>
 
 #include <mach/hardware.h>
 #include <plat/board.h>
@@ -132,6 +133,7 @@ static const struct backlight_ops omapbl_ops = {
 
 static int omapbl_probe(struct platform_device *pdev)
 {
+       struct backlight_properties props;
        struct backlight_device *dev;
        struct omap_backlight *bl;
        struct omap_backlight_config *pdata = pdev->dev.platform_data;
@@ -143,7 +145,10 @@ static int omapbl_probe(struct platform_device *pdev)
        if (unlikely(!bl))
                return -ENOMEM;
 
-       dev = backlight_device_register("omap-bl", &pdev->dev, bl, &omapbl_ops);
+       memset(&props, 0, sizeof(struct backlight_properties));
+       props.max_brightness = OMAPBL_MAX_INTENSITY;
+       dev = backlight_device_register("omap-bl", &pdev->dev, bl, &omapbl_ops,
+                                       &props);
        if (IS_ERR(dev)) {
                kfree(bl);
                return PTR_ERR(dev);
@@ -160,7 +165,6 @@ static int omapbl_probe(struct platform_device *pdev)
        omap_cfg_reg(PWL);      /* Conflicts with UART3 */
 
        dev->props.fb_blank = FB_BLANK_UNBLANK;
-       dev->props.max_brightness = OMAPBL_MAX_INTENSITY;
        dev->props.brightness = pdata->default_intensity;
        omapbl_update_status(dev);