]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/video/backlight/wm831x_bl.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[mirror_ubuntu-zesty-kernel.git] / drivers / video / backlight / wm831x_bl.c
index e32add37a203453558c80a6c195276cb402094c6..08fd87f3aecce368219ed7cb08dfdaa0aebafef6 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 #include <linux/backlight.h>
+#include <linux/slab.h>
 
 #include <linux/mfd/wm831x/core.h>
 #include <linux/mfd/wm831x/pdata.h>
@@ -125,6 +126,7 @@ static int wm831x_backlight_probe(struct platform_device *pdev)
        struct wm831x_backlight_pdata *pdata;
        struct wm831x_backlight_data *data;
        struct backlight_device *bl;
+       struct backlight_properties props;
        int ret, i, max_isel, isink_reg, dcdc_cfg;
 
        /* We need platform data */
@@ -191,15 +193,15 @@ static int wm831x_backlight_probe(struct platform_device *pdev)
        data->current_brightness = 0;
        data->isink_reg = isink_reg;
 
-       bl = backlight_device_register("wm831x", &pdev->dev,
-                       data, &wm831x_backlight_ops);
+       props.max_brightness = max_isel;
+       bl = backlight_device_register("wm831x", &pdev->dev, data,
+                                      &wm831x_backlight_ops, &props);
        if (IS_ERR(bl)) {
                dev_err(&pdev->dev, "failed to register backlight\n");
                kfree(data);
                return PTR_ERR(bl);
        }
 
-       bl->props.max_brightness = max_isel;
        bl->props.brightness = max_isel;
 
        platform_set_drvdata(pdev, bl);