Re: adx_wdt.c: use resource_size()

From: Thierry Reding
Date: Mon Dec 07 2009 - 02:08:52 EST


* H Hartley Sweeten wrote:
> Use resource_size().
>
> Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
> Cc: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>
>
> ---
>
> diff --git a/drivers/watchdog/adx_wdt.c b/drivers/watchdog/adx_wdt.c
> index 77afb0a..ee95758 100644
> --- a/drivers/watchdog/adx_wdt.c
> +++ b/drivers/watchdog/adx_wdt.c
> @@ -242,14 +242,14 @@ static int __devinit adx_wdt_probe(struct platform_device *pdev)
> }
>
> res = devm_request_mem_region(&pdev->dev, res->start,
> - res->end - res->start + 1, res->name);
> + resource_size(res), res->name);
> if (!res) {
> dev_err(&pdev->dev, "cannot request I/O memory region\n");
> return -ENXIO;
> }
>
> wdt->base = devm_ioremap_nocache(&pdev->dev, res->start,
> - res->end - res->start + 1);
> + resource_size(res));
> if (!wdt->base) {
> dev_err(&pdev->dev, "cannot remap I/O memory region\n");
> return -ENXIO;

Acked-by: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/