Merge branch 'common/fbdev-meram' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorPaul Mundt <lethal@linux-sh.org>
Wed, 25 May 2011 06:01:25 +0000 (15:01 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 25 May 2011 06:01:25 +0000 (15:01 +0900)
1  2 
drivers/video/sh_mobile_lcdcfb.c

@@@ -471,6 -471,7 +471,6 @@@ static int sh_mobile_lcdc_start(struct 
        int bpp = 0;
        unsigned long ldddsr;
        int k, m;
 -      int ret = 0;
  
        /* enable clocks before accessing the hardware */
        for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
                lcdc_write_chan(ch, LDPMR, 0);
  
                board_cfg = &ch->cfg.board_cfg;
 -              if (board_cfg->setup_sys)
 -                      ret = board_cfg->setup_sys(board_cfg->board_data, ch,
 -                                                 &sh_mobile_lcdc_sys_bus_ops);
 -              if (ret)
 -                      return ret;
 +              if (board_cfg->setup_sys) {
 +                      int ret = board_cfg->setup_sys(board_cfg->board_data,
 +                                              ch, &sh_mobile_lcdc_sys_bus_ops);
 +                      if (ret)
 +                              return ret;
 +              }
        }
  
        /* word and long word swap */
                pitch = ch->info->fix.line_length;
  
                /* test if we can enable meram */
-               if (ch->cfg.meram_cfg && priv->meram_dev) {
+               if (ch->cfg.meram_cfg && priv->meram_dev &&
+                               priv->meram_dev->ops) {
                        struct sh_mobile_meram_cfg *cfg;
                        struct sh_mobile_meram_info *mdev;
                        unsigned long icb_addr_y, icb_addr_c;
@@@ -1375,6 -1376,7 +1376,6 @@@ static int sh_mobile_lcdc_notify(struc
        struct fb_info *info = event->info;
        struct sh_mobile_lcdc_chan *ch = info->par;
        struct sh_mobile_lcdc_board_cfg *board_cfg = &ch->cfg.board_cfg;
 -      int ret;
  
        if (&ch->lcdc->notifier != nb)
                return NOTIFY_DONE;
                        board_cfg->display_off(board_cfg->board_data);
                        module_put(board_cfg->owner);
                }
 -              pm_runtime_put(info->device);
                sh_mobile_lcdc_stop(ch->lcdc);
                break;
        case FB_EVENT_RESUME:
                        module_put(board_cfg->owner);
                }
  
 -              ret = sh_mobile_lcdc_start(ch->lcdc);
 -              if (!ret)
 -                      pm_runtime_get_sync(info->device);
 +              sh_mobile_lcdc_start(ch->lcdc);
        }
  
        return NOTIFY_OK;