diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:47 -0500 |
commit | e2cbdf3cb72571f1231cd7c3cb14009f9b8df707 (patch) | |
tree | 79cab96de9801117a1bbe723646b5408d0ea20fc | |
parent | b0de774c6334dccdcd43a7ef46155a1f3a52a954 (diff) |
power: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/power/jz4740-battery.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c index bf914893c6fd..c675553d4647 100644 --- a/drivers/power/jz4740-battery.c +++ b/drivers/power/jz4740-battery.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/err.h> | ||
25 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
26 | #include <linux/mfd/core.h> | 27 | #include <linux/mfd/core.h> |
27 | #include <linux/power_supply.h> | 28 | #include <linux/power_supply.h> |
@@ -266,9 +267,9 @@ static int jz_battery_probe(struct platform_device *pdev) | |||
266 | 267 | ||
267 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 268 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
268 | 269 | ||
269 | jz_battery->base = devm_request_and_ioremap(&pdev->dev, mem); | 270 | jz_battery->base = devm_ioremap_resource(&pdev->dev, mem); |
270 | if (!jz_battery->base) | 271 | if (IS_ERR(jz_battery->base)) |
271 | return -EBUSY; | 272 | return PTR_ERR(jz_battery->base); |
272 | 273 | ||
273 | battery = &jz_battery->battery; | 274 | battery = &jz_battery->battery; |
274 | battery->name = pdata->info.name; | 275 | battery->name = pdata->info.name; |