diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-09-03 07:20:08 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-09-14 17:22:46 +0900 |
commit | baf163749952ca5e33dd2d6a74da023e385c3a00 (patch) | |
tree | c2aa5542de0861046c3bda8efd8c5d9c696a0cc2 | |
parent | 44432407d9f5e4b2e56c7eccb65d98cad4bba191 (diff) | |
download | kernel_samsung_crespo-baf163749952ca5e33dd2d6a74da023e385c3a00.zip kernel_samsung_crespo-baf163749952ca5e33dd2d6a74da023e385c3a00.tar.gz kernel_samsung_crespo-baf163749952ca5e33dd2d6a74da023e385c3a00.tar.bz2 |
fbdev: sh_mobile_lcdcfb: fix notifier callback return codes
Notifier callbacks have to return either one of NOTIFY_* codes or a negative
errno, converted to a suitable value by the notifier_from_errno() inline, if
the notifier chain shall not be continued.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 14 |
1 files changed, 8 insertions, 6 deletions
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); |