aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/atmel_lcdfb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r--drivers/video/atmel_lcdfb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 3d886c6902f9..11de3bfd4e54 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -117,6 +117,7 @@ static struct backlight_ops atmel_lcdc_bl_ops = {
117 117
118static void init_backlight(struct atmel_lcdfb_info *sinfo) 118static void init_backlight(struct atmel_lcdfb_info *sinfo)
119{ 119{
120 struct backlight_properties props;
120 struct backlight_device *bl; 121 struct backlight_device *bl;
121 122
122 sinfo->bl_power = FB_BLANK_UNBLANK; 123 sinfo->bl_power = FB_BLANK_UNBLANK;
@@ -124,8 +125,10 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo)
124 if (sinfo->backlight) 125 if (sinfo->backlight)
125 return; 126 return;
126 127
127 bl = backlight_device_register("backlight", &sinfo->pdev->dev, 128 memset(&props, 0, sizeof(struct backlight_properties));
128 sinfo, &atmel_lcdc_bl_ops); 129 props.max_brightness = 0xff;
130 bl = backlight_device_register("backlight", &sinfo->pdev->dev, sinfo,
131 &atmel_lcdc_bl_ops, &props);
129 if (IS_ERR(bl)) { 132 if (IS_ERR(bl)) {
130 dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", 133 dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n",
131 PTR_ERR(bl)); 134 PTR_ERR(bl));
@@ -135,7 +138,6 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo)
135 138
136 bl->props.power = FB_BLANK_UNBLANK; 139 bl->props.power = FB_BLANK_UNBLANK;
137 bl->props.fb_blank = FB_BLANK_UNBLANK; 140 bl->props.fb_blank = FB_BLANK_UNBLANK;
138 bl->props.max_brightness = 0xff;
139 bl->props.brightness = atmel_bl_get_brightness(bl); 141 bl->props.brightness = atmel_bl_get_brightness(bl);
140} 142}
141 143