diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 4 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 6 | ||||
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 6 | ||||
-rw-r--r-- | include/video/sh_mobile_lcdc.h | 4 |
5 files changed, 10 insertions, 16 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index d366e7873a34..123232329a88 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -391,13 +391,11 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
391 | .flags = 0, | 391 | .flags = 0, |
392 | .lcd_size_cfg.width = 152, | 392 | .lcd_size_cfg.width = 152, |
393 | .lcd_size_cfg.height = 91, | 393 | .lcd_size_cfg.height = 91, |
394 | .board_cfg = { | ||
395 | .set_brightness = mackerel_set_brightness, | ||
396 | .get_brightness = mackerel_get_brightness, | ||
397 | }, | ||
398 | .bl_info = { | 394 | .bl_info = { |
399 | .name = "sh_mobile_lcdc_bl", | 395 | .name = "sh_mobile_lcdc_bl", |
400 | .max_brightness = 1, | 396 | .max_brightness = 1, |
397 | .set_brightness = mackerel_set_brightness, | ||
398 | .get_brightness = mackerel_get_brightness, | ||
401 | }, | 399 | }, |
402 | .meram_cfg = &lcd_meram_cfg, | 400 | .meram_cfg = &lcd_meram_cfg, |
403 | } | 401 | } |
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index edc1d1bbfa70..d0d2401c3cbc 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -220,12 +220,12 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
220 | .board_cfg = { | 220 | .board_cfg = { |
221 | .display_on = ap320_wvga_power_on, | 221 | .display_on = ap320_wvga_power_on, |
222 | .display_off = ap320_wvga_power_off, | 222 | .display_off = ap320_wvga_power_off, |
223 | .set_brightness = ap320_wvga_set_brightness, | ||
224 | .get_brightness = ap320_wvga_get_brightness, | ||
225 | }, | 223 | }, |
226 | .bl_info = { | 224 | .bl_info = { |
227 | .name = "sh_mobile_lcdc_bl", | 225 | .name = "sh_mobile_lcdc_bl", |
228 | .max_brightness = 1, | 226 | .max_brightness = 1, |
227 | .set_brightness = ap320_wvga_set_brightness, | ||
228 | .get_brightness = ap320_wvga_get_brightness, | ||
229 | }, | 229 | }, |
230 | } | 230 | } |
231 | }; | 231 | }; |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 7ed3061e01da..769aab3fa379 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -331,13 +331,11 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
331 | .width = 152, | 331 | .width = 152, |
332 | .height = 91, | 332 | .height = 91, |
333 | }, | 333 | }, |
334 | .board_cfg = { | ||
335 | .set_brightness = ecovec24_set_brightness, | ||
336 | .get_brightness = ecovec24_get_brightness, | ||
337 | }, | ||
338 | .bl_info = { | 334 | .bl_info = { |
339 | .name = "sh_mobile_lcdc_bl", | 335 | .name = "sh_mobile_lcdc_bl", |
340 | .max_brightness = 1, | 336 | .max_brightness = 1, |
337 | .set_brightness = ecovec24_set_brightness, | ||
338 | .get_brightness = ecovec24_get_brightness, | ||
341 | }, | 339 | }, |
342 | } | 340 | } |
343 | }; | 341 | }; |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index c54eb973de28..adfffd6b7ec1 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -1317,22 +1317,20 @@ static struct fb_ops sh_mobile_lcdc_ops = { | |||
1317 | static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev) | 1317 | static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev) |
1318 | { | 1318 | { |
1319 | struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev); | 1319 | struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev); |
1320 | struct sh_mobile_lcdc_board_cfg *cfg = &ch->cfg.board_cfg; | ||
1321 | int brightness = bdev->props.brightness; | 1320 | int brightness = bdev->props.brightness; |
1322 | 1321 | ||
1323 | if (bdev->props.power != FB_BLANK_UNBLANK || | 1322 | if (bdev->props.power != FB_BLANK_UNBLANK || |
1324 | bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) | 1323 | bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) |
1325 | brightness = 0; | 1324 | brightness = 0; |
1326 | 1325 | ||
1327 | return cfg->set_brightness(brightness); | 1326 | return ch->cfg.bl_info.set_brightness(brightness); |
1328 | } | 1327 | } |
1329 | 1328 | ||
1330 | static int sh_mobile_lcdc_get_brightness(struct backlight_device *bdev) | 1329 | static int sh_mobile_lcdc_get_brightness(struct backlight_device *bdev) |
1331 | { | 1330 | { |
1332 | struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev); | 1331 | struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev); |
1333 | struct sh_mobile_lcdc_board_cfg *cfg = &ch->cfg.board_cfg; | ||
1334 | 1332 | ||
1335 | return cfg->get_brightness(); | 1333 | return ch->cfg.bl_info.get_brightness(); |
1336 | } | 1334 | } |
1337 | 1335 | ||
1338 | static int sh_mobile_lcdc_check_fb(struct backlight_device *bdev, | 1336 | static int sh_mobile_lcdc_check_fb(struct backlight_device *bdev, |
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h index 62be2c933e9f..ecde6aad6f29 100644 --- a/include/video/sh_mobile_lcdc.h +++ b/include/video/sh_mobile_lcdc.h | |||
@@ -154,8 +154,6 @@ struct sh_mobile_lcdc_board_cfg { | |||
154 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 154 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
155 | void (*display_on)(void); | 155 | void (*display_on)(void); |
156 | void (*display_off)(void); | 156 | void (*display_off)(void); |
157 | int (*set_brightness)(int brightness); | ||
158 | int (*get_brightness)(void); | ||
159 | }; | 157 | }; |
160 | 158 | ||
161 | struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */ | 159 | struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */ |
@@ -167,6 +165,8 @@ struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */ | |||
167 | struct sh_mobile_lcdc_bl_info { | 165 | struct sh_mobile_lcdc_bl_info { |
168 | const char *name; | 166 | const char *name; |
169 | int max_brightness; | 167 | int max_brightness; |
168 | int (*set_brightness)(int brightness); | ||
169 | int (*get_brightness)(void); | ||
170 | }; | 170 | }; |
171 | 171 | ||
172 | struct sh_mobile_lcdc_chan_cfg { | 172 | struct sh_mobile_lcdc_chan_cfg { |