include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / video / aty / radeon_backlight.c
index fa1198c4ccc5d0041072b5ca95913134e3531ee3..256966e9667db3bfa776e71c51a694c3239c3432 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "radeonfb.h"
 #include <linux/backlight.h>
+#include <linux/slab.h>
 
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
@@ -134,6 +135,7 @@ static struct backlight_ops radeon_bl_data = {
 
 void radeonfb_bl_init(struct radeonfb_info *rinfo)
 {
+       struct backlight_properties props;
        struct backlight_device *bd;
        struct radeon_bl_privdata *pdata;
        char name[12];
@@ -155,7 +157,10 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
 
        snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node);
 
-       bd = backlight_device_register(name, rinfo->info->dev, pdata, &radeon_bl_data);
+       memset(&props, 0, sizeof(struct backlight_properties));
+       props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
+       bd = backlight_device_register(name, rinfo->info->dev, pdata,
+                                      &radeon_bl_data, &props);
        if (IS_ERR(bd)) {
                rinfo->info->bl_dev = NULL;
                printk("radeonfb: Backlight registration failed\n");
@@ -185,7 +190,6 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
                 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL,
                217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL);
 
-       bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1;
        bd->props.brightness = bd->props.max_brightness;
        bd->props.power = FB_BLANK_UNBLANK;
        backlight_update_status(bd);