aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-05-05 12:32:36 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-05-24 02:42:04 -0400
commit69843ba7f24950f8ef5dadacfbfbd08f53e3455b (patch)
tree58e3974ed0660c789666cbb2132b1357eeb6dd0d /drivers/video/sh_mobile_lcdcfb.c
parent81df448eb02db14128875a6cff90876b39422a6d (diff)
fbdev: sh_mobile_lcdc: reduce scope of a variable
The "ret" variable in sh_mobile_lcdc_start() is only used at one location, move its definition to the inner-most scope. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 9bcc61b4ef14..466834c604da 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -469,7 +469,6 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
469 int bpp = 0; 469 int bpp = 0;
470 unsigned long ldddsr; 470 unsigned long ldddsr;
471 int k, m; 471 int k, m;
472 int ret = 0;
473 472
474 /* enable clocks before accessing the hardware */ 473 /* enable clocks before accessing the hardware */
475 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { 474 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
@@ -538,11 +537,12 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
538 lcdc_write_chan(ch, LDPMR, 0); 537 lcdc_write_chan(ch, LDPMR, 0);
539 538
540 board_cfg = &ch->cfg.board_cfg; 539 board_cfg = &ch->cfg.board_cfg;
541 if (board_cfg->setup_sys) 540 if (board_cfg->setup_sys) {
542 ret = board_cfg->setup_sys(board_cfg->board_data, ch, 541 int ret = board_cfg->setup_sys(board_cfg->board_data,
543 &sh_mobile_lcdc_sys_bus_ops); 542 ch, &sh_mobile_lcdc_sys_bus_ops);
544 if (ret) 543 if (ret)
545 return ret; 544 return ret;
545 }
546 } 546 }
547 547
548 /* word and long word swap */ 548 /* word and long word swap */