lkml.org 
[lkml]   [2012]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] drivres/power/jz4740-battery.c: Use devm_request_and_ioremap
On 11/07/2012 12:11 AM, Marcos Paulo de Souza wrote:
> No functional changes. Just a cleanup.
>
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

Looks good to me:

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

One minor comment though:

> ---
> drivers/power/jz4740-battery.c | 33 +++++++--------------------------
> 1 file changed, 7 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/power/jz4740-battery.c b/drivers/power/jz4740-battery.c
> index 59900c6..e4ec7eb 100644
> --- a/drivers/power/jz4740-battery.c
> +++ b/drivers/power/jz4740-battery.c
>[...]
> - jz_battery->base = ioremap_nocache(jz_battery->mem->start,
> - resource_size(jz_battery->mem));
> + jz_battery->base = devm_request_and_ioremap(&pdev->dev, mem);
> if (!jz_battery->base) {
> - ret = -EBUSY;
> - dev_err(&pdev->dev, "Failed to ioremap mmio memory\n");
> - goto err_release_mem_region;
> + dev_err(&pdev->dev, "Failed to request/ioremap mmio memory\n");

devm_request_and_ioremap will print its own error messages if it fails, so
strictly speaking this is not necessary, but I don't think it is worth doing
resend just for this.

Anton, maybe you can just remove the line when applying the patch.

Thanks,
- Lars

> + return -EBUSY;
> }
>
[...]



\
 
 \ /
  Last update: 2012-11-09 11:21    [W:0.060 / U:2.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site