From patchwork Thu May 5 16:33:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 757692 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p45GXhdC017659 for ; Thu, 5 May 2011 16:33:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755409Ab1EEQdm (ORCPT ); Thu, 5 May 2011 12:33:42 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:63634 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755361Ab1EEQdm (ORCPT ); Thu, 5 May 2011 12:33:42 -0400 Received: from axis700.grange (pD9EB90E6.dip0.t-ipconnect.de [217.235.144.230]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0Ls9b5-1PctQZ36KN-013sGx; Thu, 05 May 2011 18:33:40 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 6CF6E189B89; Thu, 5 May 2011 18:33:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 6AA3E189B88; Thu, 5 May 2011 18:33:40 +0200 (CEST) Date: Thu, 5 May 2011 18:33:40 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: linux-fbdev@vger.kernel.org, Magnus Damm Subject: [PATCH] fbdev: sh_mobile_lcdc: remove runtime PM calls from the notifier Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:f+aXcZ3GEuWNEi6aDH7STxB6xKeEmLgcuazGRkZya8N nCzS8YYhbEOjm6e1UCmqC0b3tknsuk2dqjezIXWCAXqSWx4vWJ qdP/TdEvhPTqMbiJSVzHMJzPqrMVsFTTNRwEw+fdDwKBvBxYcf euSta1j/sTIZzJLOQs8bfVFwE4vKTVip63hiZcjfmStM4BteAS qAsdgZUyWjQAFtOlCAP0I5YyJdiM1bueJ9sULsUJ6s= Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 05 May 2011 16:33:45 +0000 (UTC) The notifier function calls sh_mobile_lcdc_stop() and sh_mobile_lcdc_start(), which already take care about the runtime PM state. Remove redundant calls. Signed-off-by: Guennadi Liakhovetski --- drivers/video/sh_mobile_lcdcfb.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 466834c..04f2260 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -1288,7 +1288,6 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, 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; @@ -1302,7 +1301,6 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, 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: @@ -1316,9 +1314,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, 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;