From: Thierry Reding <thierry.reding@avionic-design.de>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: adx_wdt.c: use resource_size()
Date: Mon, 7 Dec 2009 08:07:08 +0100 [thread overview]
Message-ID: <20091207070708.GA8919@avionic-design.de> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901FB06C8@mi8nycmail19.Mi8.com>
* H Hartley Sweeten wrote:
> Use resource_size().
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Thierry Reding <thierry.reding@avionic-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@avionic-design.de>
prev parent reply other threads:[~2009-12-07 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 17:20 adx_wdt.c: use resource_size() H Hartley Sweeten
2009-12-07 7:07 ` Thierry Reding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091207070708.GA8919@avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=hartleys@visionengravers.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox