diff options
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 3d886c6902f9..8dce25126330 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/backlight.h> | 19 | #include <linux/backlight.h> |
20 | #include <linux/gfp.h> | ||
20 | 21 | ||
21 | #include <mach/board.h> | 22 | #include <mach/board.h> |
22 | #include <mach/cpu.h> | 23 | #include <mach/cpu.h> |
@@ -117,6 +118,7 @@ static struct backlight_ops atmel_lcdc_bl_ops = { | |||
117 | 118 | ||
118 | static void init_backlight(struct atmel_lcdfb_info *sinfo) | 119 | static void init_backlight(struct atmel_lcdfb_info *sinfo) |
119 | { | 120 | { |
121 | struct backlight_properties props; | ||
120 | struct backlight_device *bl; | 122 | struct backlight_device *bl; |
121 | 123 | ||
122 | sinfo->bl_power = FB_BLANK_UNBLANK; | 124 | sinfo->bl_power = FB_BLANK_UNBLANK; |
@@ -124,8 +126,10 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) | |||
124 | if (sinfo->backlight) | 126 | if (sinfo->backlight) |
125 | return; | 127 | return; |
126 | 128 | ||
127 | bl = backlight_device_register("backlight", &sinfo->pdev->dev, | 129 | memset(&props, 0, sizeof(struct backlight_properties)); |
128 | sinfo, &atmel_lcdc_bl_ops); | 130 | props.max_brightness = 0xff; |
131 | bl = backlight_device_register("backlight", &sinfo->pdev->dev, sinfo, | ||
132 | &atmel_lcdc_bl_ops, &props); | ||
129 | if (IS_ERR(bl)) { | 133 | if (IS_ERR(bl)) { |
130 | dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", | 134 | dev_err(&sinfo->pdev->dev, "error %ld on backlight register\n", |
131 | PTR_ERR(bl)); | 135 | PTR_ERR(bl)); |
@@ -135,7 +139,6 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) | |||
135 | 139 | ||
136 | bl->props.power = FB_BLANK_UNBLANK; | 140 | bl->props.power = FB_BLANK_UNBLANK; |
137 | bl->props.fb_blank = FB_BLANK_UNBLANK; | 141 | bl->props.fb_blank = FB_BLANK_UNBLANK; |
138 | bl->props.max_brightness = 0xff; | ||
139 | bl->props.brightness = atmel_bl_get_brightness(bl); | 142 | bl->props.brightness = atmel_bl_get_brightness(bl); |
140 | } | 143 | } |
141 | 144 | ||