From patchwork Fri Sep 3 07:20:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 152441 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 o837Jie3012912 for ; Fri, 3 Sep 2010 07:20:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755003Ab0ICHUK (ORCPT ); Fri, 3 Sep 2010 03:20:10 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:43466 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1754927Ab0ICHUK (ORCPT ); Fri, 3 Sep 2010 03:20:10 -0400 Received: (qmail invoked by alias); 03 Sep 2010 07:20:03 -0000 Received: from p50898987.dip0.t-ipconnect.de (EHLO axis700.grange) [80.137.137.135] by mail.gmx.net (mp051) with SMTP; 03 Sep 2010 09:20:03 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX19BAWQxHiRBoffiYzDGGPfcIoj55yHeV9iMYGjowF 8i2bApWTnLq1uY Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1OrQZE-0000vQ-Dr; Fri, 03 Sep 2010 09:20:08 +0200 Date: Fri, 3 Sep 2010 09:20:08 +0200 (CEST) From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org cc: linux-fbdev@vger.kernel.org Subject: [PATCH 06/15] fbdev: sh_mobile_lcdcfb: fix notifier callback return codes In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 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.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Sep 2010 07:20:12 +0000 (UTC) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index ce3ed4b..2f6e37e 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -964,7 +964,7 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, struct fb_var_screeninfo *var; if (&ch->lcdc->notifier != nb) - return 0; + return NOTIFY_DONE; dev_dbg(info->dev, "%s(): action = %lu, data = %p\n", __func__, action, event->data); @@ -991,23 +991,25 @@ static int sh_mobile_lcdc_notify(struct notifier_block *nb, /* Can we handle this display? */ if (var->xres > ch->cfg.lcd_cfg[0].xres || var->yres > ch->cfg.lcd_cfg[0].yres) - return -ENOMEM; + /* + * LCDC resume failed, no need to continue with + * the notifier chain + */ + return notifier_from_errno(-ENOMEM); /* Add to the modelist */ fb_var_to_videomode(&mode, var); ret = fb_add_videomode(&mode, &ch->info->modelist); if (ret < 0) - return ret; + return notifier_from_errno(ret); } pm_runtime_get_sync(info->device); sh_mobile_lcdc_geometry(ch); - - break; } - return 0; + return NOTIFY_OK; } static int sh_mobile_lcdc_remove(struct platform_device *pdev);