mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: thierry.reding@avionic-design.de, gregkh@linuxfoundation.org,
	sachin.kamat@linaro.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org
Subject: [PATCH 2/3] Input: tegra-kbc- Convert to devm_ioremap_resource()
Date: Thu, 31 Jan 2013 15:55:38 +0530	[thread overview]
Message-ID: <1359627939-2685-2-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1359627939-2685-1-git-send-email-sachin.kamat@linaro.org>

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>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
---
Compile tested with linux-next (20130128)
---
 drivers/input/keyboard/tegra-kbc.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 46e8ad2..016d931 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -31,6 +31,7 @@
 #include <linux/slab.h>
 #include <linux/input/tegra_kbc.h>
 #include <linux/clk/tegra.h>
+#include <linux/err.h>
 
 #define KBC_MAX_DEBOUNCE_CNT	0x3ffu
 
@@ -615,10 +616,10 @@ static int tegra_kbc_probe(struct platform_device *pdev)
 	spin_lock_init(&kbc->lock);
 	setup_timer(&kbc->timer, tegra_kbc_keypress_timer, (unsigned long)kbc);
 
-	kbc->mmio = devm_request_and_ioremap(&pdev->dev, res);
-	if (!kbc->mmio) {
+	kbc->mmio = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(kbc->mmio)) {
 		dev_err(&pdev->dev, "Cannot request memregion/iomap address\n");
-		return -EBUSY;
+		return PTR_ERR(kbc->mmio);
 	}
 
 	kbc->clk = devm_clk_get(&pdev->dev, NULL);
-- 
1.7.4.1


  reply	other threads:[~2013-01-31 10:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 10:25 [PATCH 1/3] video: exynos_mipi_dsi: " Sachin Kamat
2013-01-31 10:25 ` Sachin Kamat [this message]
2013-01-31 10:25 ` [PATCH 3/3] serial: tegra: " Sachin Kamat
2013-01-31 17:00   ` Stephen Warren
2013-02-01  4:20     ` Sachin Kamat
2013-02-01  4:24       ` Stephen Warren
2013-02-01  9:49         ` Sachin Kamat
2013-02-01 17:18           ` Stephen Warren
     [not found]             ` <CAK9yfHx1jLPpdCHAb-pC-C7wt81gQLgTnpuvK+0aNKkhuXHcDQ@mail.gmail.com>
2013-03-15 16:38               ` gregkh
2013-03-15 17:14                 ` Stephen Warren
2013-03-15 17:33                   ` gregkh
2013-03-18  5:57                     ` Sachin Kamat
2013-01-31 10:42 ` [PATCH 1/3] video: exynos_mipi_dsi: " Thierry Reding
2013-01-31 11:20   ` Sachin Kamat

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=1359627939-2685-2-git-send-email-sachin.kamat@linaro.org \
    --to=sachin.kamat@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@avionic-design.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®