Messages in this thread | | | Date | Fri, 09 Nov 2012 10:42:11 +0100 | From | Lars-Peter Clausen <> | Subject | Re: [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; > } > [...]
| |