* [PATCH] drivers: cpuidle: Use devm_ioremap_resource function
@ 2013-03-16 14:39 Alexandru Gheorghiu
2013-03-18 13:26 ` Jason Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Gheorghiu @ 2013-03-16 14:39 UTC (permalink / raw)
To: Jason Cooper
Cc: Andrew Lunn, Daniel Lezcano, linux-kernel, Alexandru Gheorghiu
Use devm_ioremap_resource function, which provides better error handling,
instead of devm_request_and_ioremap.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
---
drivers/cpuidle/cpuidle-kirkwood.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c
index 670aa1e..53aad73 100644
--- a/drivers/cpuidle/cpuidle-kirkwood.c
+++ b/drivers/cpuidle/cpuidle-kirkwood.c
@@ -66,9 +66,9 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev)
if (res == NULL)
return -EINVAL;
- ddr_operation_base = devm_request_and_ioremap(&pdev->dev, res);
- if (!ddr_operation_base)
- return -EADDRNOTAVAIL;
+ ddr_operation_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(ddr_operation_base))
+ return PTR_ERR(ddr_operation_base);
device = &per_cpu(kirkwood_cpuidle_device, smp_processor_id());
device->state_count = KIRKWOOD_MAX_STATES;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: cpuidle: Use devm_ioremap_resource function
2013-03-16 14:39 [PATCH] drivers: cpuidle: Use devm_ioremap_resource function Alexandru Gheorghiu
@ 2013-03-18 13:26 ` Jason Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Jason Cooper @ 2013-03-18 13:26 UTC (permalink / raw)
To: Alexandru Gheorghiu; +Cc: Andrew Lunn, Daniel Lezcano, linux-kernel
On Sat, Mar 16, 2013 at 04:39:21PM +0200, Alexandru Gheorghiu wrote:
> Use devm_ioremap_resource function, which provides better error handling,
> instead of devm_request_and_ioremap.
> Patch found using coccinelle.
>
> Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
> ---
> drivers/cpuidle/cpuidle-kirkwood.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Acked-by: Jason Cooper <jason@lakedaemon.net>
thx,
Jason.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-18 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 14:39 [PATCH] drivers: cpuidle: Use devm_ioremap_resource function Alexandru Gheorghiu
2013-03-18 13:26 ` Jason Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).