Message ID | 1365415496-6825-1-git-send-email-sachin.kamat@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 08/04/13 22:04, Sachin Kamat wrote: > Use the newly introduced devm_ioremap_resource() instead of > devm_request_and_ioremap() which provides more consistent error handling. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > --- > drivers/video/wm8505fb.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c > index 19e2e7f..01f9ace 100644 > --- a/drivers/video/wm8505fb.c > +++ b/drivers/video/wm8505fb.c > @@ -18,6 +18,7 @@ > #include <linux/dma-mapping.h> > #include <linux/fb.h> > #include <linux/errno.h> > +#include <linux/err.h> > #include <linux/init.h> > #include <linux/interrupt.h> > #include <linux/io.h> > @@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev) > fbi->fb.pseudo_palette = addr; > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - fbi->regbase = devm_request_and_ioremap(&pdev->dev, res); > - if (fbi->regbase == NULL) > - return -EBUSY; > + fbi->regbase = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(fbi->regbase)) > + return PTR_ERR(fbi->regbase); > > disp_timing = of_get_display_timings(pdev->dev.of_node); > if (!disp_timing) Looks fine, Acked-by: Tony Prisk <linux@prisktech.co.nz> Regards Tony P -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2013-04-08 13:04, Sachin Kamat wrote: > Use the newly introduced devm_ioremap_resource() instead of > devm_request_and_ioremap() which provides more consistent error handling. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > --- > drivers/video/wm8505fb.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c > index 19e2e7f..01f9ace 100644 > --- a/drivers/video/wm8505fb.c > +++ b/drivers/video/wm8505fb.c > @@ -18,6 +18,7 @@ > #include <linux/dma-mapping.h> > #include <linux/fb.h> > #include <linux/errno.h> > +#include <linux/err.h> > #include <linux/init.h> > #include <linux/interrupt.h> > #include <linux/io.h> > @@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev) > fbi->fb.pseudo_palette = addr; > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - fbi->regbase = devm_request_and_ioremap(&pdev->dev, res); > - if (fbi->regbase == NULL) > - return -EBUSY; > + fbi->regbase = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(fbi->regbase)) > + return PTR_ERR(fbi->regbase); > > disp_timing = of_get_display_timings(pdev->dev.of_node); > if (!disp_timing) > Thanks, applying on top of the previous series from Tony Prisk. Tomi
diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c index 19e2e7f..01f9ace 100644 --- a/drivers/video/wm8505fb.c +++ b/drivers/video/wm8505fb.c @@ -18,6 +18,7 @@ #include <linux/dma-mapping.h> #include <linux/fb.h> #include <linux/errno.h> +#include <linux/err.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> @@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev) fbi->fb.pseudo_palette = addr; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - fbi->regbase = devm_request_and_ioremap(&pdev->dev, res); - if (fbi->regbase == NULL) - return -EBUSY; + fbi->regbase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(fbi->regbase)) + return PTR_ERR(fbi->regbase); disp_timing = of_get_display_timings(pdev->dev.of_node); if (!disp_timing)
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/video/wm8505fb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)