From: Alexey Charkov Date: Mon, 20 Dec 2010 13:03:14 +0000 (+0300) Subject: fbdev: Minor cleanup in WM8505-related code X-Git-Tag: v3.0~2502^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7f53284e97af9670a68993c31f61a4e62a19ea5;p=platform%2Fkernel%2Flinux-amlogic.git fbdev: Minor cleanup in WM8505-related code This replaces the last remaining driver name reference with the macro for uniformity in wm8505fb. In addition, the error return path in wmt_ge_rops.c is made more uniform by getting rid of goto's in remaining places. Signed-off-by: Alexey Charkov Signed-off-by: Paul Mundt --- diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c index e37251b..9ca9dbb 100644 --- a/drivers/video/wm8505fb.c +++ b/drivers/video/wm8505fb.c @@ -291,7 +291,7 @@ static int __devinit wm8505fb_probe(struct platform_device *pdev) goto failed_fbi; } - res = request_mem_region(res->start, resource_size(res), "wm8505fb"); + res = request_mem_region(res->start, resource_size(res), DRIVER_NAME); if (res == NULL) { dev_err(&pdev->dev, "failed to request I/O memory\n"); ret = -EBUSY; diff --git a/drivers/video/wmt_ge_rops.c b/drivers/video/wmt_ge_rops.c index f31883f..45832b7 100644 --- a/drivers/video/wmt_ge_rops.c +++ b/drivers/video/wmt_ge_rops.c @@ -127,13 +127,11 @@ EXPORT_SYMBOL_GPL(wmt_ge_sync); static int __devinit wmt_ge_rops_probe(struct platform_device *pdev) { struct resource *res; - int ret; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { dev_err(&pdev->dev, "no I/O memory resource defined\n"); - ret = -ENODEV; - goto error; + return -ENODEV; } /* Only one ROP engine is presently supported. */ @@ -145,17 +143,13 @@ static int __devinit wmt_ge_rops_probe(struct platform_device *pdev) regbase = ioremap(res->start, resource_size(res)); if (regbase == NULL) { dev_err(&pdev->dev, "failed to map I/O memory\n"); - ret = -EBUSY; - goto error; + return -EBUSY; } writel(1, regbase + GE_ENABLE_OFF); printk(KERN_INFO "Enabled support for WMT GE raster acceleration\n"); return 0; - -error: - return ret; } static int __devexit wmt_ge_rops_remove(struct platform_device *pdev)