* [PATCH Resend] Input: tegra-kbc- Convert to devm_ioremap_resource()
@ 2013-02-25 3:47 Sachin Kamat
2013-02-25 6:48 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2013-02-25 3:47 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat, thierry.reding
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
---
Rebased on the latest Linus' tree (v3.8+).
---
drivers/input/keyboard/tegra-kbc.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 0e138eb..68b2b65 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/matrix_keypad.h>
#include <linux/clk/tegra.h>
+#include <linux/err.h>
#define KBC_MAX_GPIO 24
#define KBC_MAX_KPENT 8
@@ -608,11 +609,9 @@ static int tegra_kbc_probe(struct platform_device *pdev)
setup_timer(&kbc->timer, tegra_kbc_keypress_timer, (unsigned long)kbc);
- kbc->mmio = devm_request_and_ioremap(&pdev->dev, res);
- if (!kbc->mmio) {
- dev_err(&pdev->dev, "Cannot request memregion/iomap address\n");
- return -EBUSY;
- }
+ kbc->mmio = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(kbc->mmio))
+ return PTR_ERR(kbc->mmio);
kbc->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(kbc->clk)) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH Resend] Input: tegra-kbc- Convert to devm_ioremap_resource()
2013-02-25 3:47 [PATCH Resend] Input: tegra-kbc- Convert to devm_ioremap_resource() Sachin Kamat
@ 2013-02-25 6:48 ` Dmitry Torokhov
2013-02-25 6:52 ` Sachin Kamat
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2013-02-25 6:48 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-input, thierry.reding
On Mon, Feb 25, 2013 at 09:17:00AM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages; so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
> ---
> Rebased on the latest Linus' tree (v3.8+).
I do not have this yet. I will merge with mainline around rc3, please
ping me then.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH Resend] Input: tegra-kbc- Convert to devm_ioremap_resource()
2013-02-25 6:48 ` Dmitry Torokhov
@ 2013-02-25 6:52 ` Sachin Kamat
0 siblings, 0 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-02-25 6:52 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, thierry.reding
On 25 February 2013 12:18, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Mon, Feb 25, 2013 at 09:17:00AM +0530, Sachin Kamat wrote:
>> Use the newly introduced devm_ioremap_resource() instead of
>> devm_request_and_ioremap() which provides more consistent error handling.
>>
>> devm_ioremap_resource() provides its own error messages; so all explicit
>> error messages can be removed from the failure code paths.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
>> ---
>> Rebased on the latest Linus' tree (v3.8+).
>
> I do not have this yet. I will merge with mainline around rc3, please
> ping me then.
>
OK. I will ping you later.
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-25 6:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 3:47 [PATCH Resend] Input: tegra-kbc- Convert to devm_ioremap_resource() Sachin Kamat
2013-02-25 6:48 ` Dmitry Torokhov
2013-02-25 6:52 ` Sachin Kamat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox