[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20091207070708.GA8919@avionic-design.de>
Date: Mon, 7 Dec 2009 08:07:08 +0100
From: Thierry Reding <thierry.reding@...onic-design.de>
To: H Hartley Sweeten <hartleys@...ionengravers.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: adx_wdt.c: use resource_size()
* H Hartley Sweeten wrote:
> Use resource_size().
>
> Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
> Cc: Thierry Reding <thierry.reding@...onic-design.de>
>
> ---
>
> 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@...onic-design.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists