All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Charkov <alchark@gmail.com>
To: "Janorkar, Mayuresh" <mayur@ti.com>
Cc: Alexey Charkov <alchark@gmail.com>,
	Paul Mundt <lethal@linux-sh.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"vt8500-wm8505-linux-kernel@googlegroups.com" 
	<vt8500-wm8505-linux-kernel@googlegroups.com>
Subject: [PATCH 1/2] fbdev: Minor cleanup in WM8505-related code
Date: Mon, 20 Dec 2010 16:03:14 +0300	[thread overview]
Message-ID: <20101220130314.GA3627@alchark-u3s> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB0322F86AE6@dbde02.ent.ti.com>

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 <alchark@gmail.com>
---

Splitted the vsync change (will follow in PATCH 2/2) from trivial
cleanups. This indeed makes sense for at least bisecting purposes.
Thanks Mayuresh for the suggestion!

Best regards,
Alexey

 drivers/video/wm8505fb.c    |    2 +-
 drivers/video/wmt_ge_rops.c |   10 ++--------
 2 files changed, 3 insertions(+), 9 deletions(-)

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)
-- 
1.7.3.4


WARNING: multiple messages have this Message-ID (diff)
From: Alexey Charkov <alchark@gmail.com>
To: "Janorkar, Mayuresh" <mayur@ti.com>
Cc: Alexey Charkov <alchark@gmail.com>,
	Paul Mundt <lethal@linux-sh.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"vt8500-wm8505-linux-kernel@googlegroups.com"
	<vt8500-wm8505-linux-kernel@googlegroups.com>
Subject: [PATCH 1/2] fbdev: Minor cleanup in WM8505-related code
Date: Mon, 20 Dec 2010 13:03:14 +0000	[thread overview]
Message-ID: <20101220130314.GA3627@alchark-u3s> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB0322F86AE6@dbde02.ent.ti.com>

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 <alchark@gmail.com>
---

Splitted the vsync change (will follow in PATCH 2/2) from trivial
cleanups. This indeed makes sense for at least bisecting purposes.
Thanks Mayuresh for the suggestion!

Best regards,
Alexey

 drivers/video/wm8505fb.c    |    2 +-
 drivers/video/wmt_ge_rops.c |   10 ++--------
 2 files changed, 3 insertions(+), 9 deletions(-)

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)
-- 
1.7.3.4


  reply	other threads:[~2010-12-20 13:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-19 18:13 [PATCH] fbdev: Minor cleanup in WM8505-related code Alexey Charkov
2010-12-19 18:13 ` Alexey Charkov
2010-12-20  5:06 ` Janorkar, Mayuresh
2010-12-20  5:18   ` Janorkar, Mayuresh
2010-12-20 13:03   ` Alexey Charkov [this message]
2010-12-20 13:03     ` [PATCH 1/2] " Alexey Charkov
2010-12-20 13:09     ` [PATCH 2/2] fbdev: Modify vsync timing calculation in wm8505fb Alexey Charkov
2010-12-20 13:09       ` Alexey Charkov
2010-12-20 16:00       ` Paul Mundt
2010-12-20 16:00         ` Paul Mundt
2010-12-20 16:04         ` Alexey Charkov
2010-12-20 16:04           ` Alexey Charkov
2010-12-20 16:05           ` Paul Mundt
2010-12-20 16:05             ` Paul Mundt
2010-12-20 16:00     ` [PATCH 1/2] fbdev: Minor cleanup in WM8505-related code Paul Mundt
2010-12-20 16:00       ` Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101220130314.GA3627@alchark-u3s \
    --to=alchark@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mayur@ti.com \
    --cc=vt8500-wm8505-linux-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.