From: Sergei Shtylyov <sshtylyov@mvista.com>
To: "Kumar, Anil" <anilkumar.v@ti.com>
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
davinci-linux-open-source@linux.davincidsp.com, wim@iguana.be
Subject: Re: [PATCH] watchdog: davinci_wdt: update to devm_* API
Date: Thu, 07 Feb 2013 15:21:37 +0400 [thread overview]
Message-ID: <51138E41.3080708@mvista.com> (raw)
In-Reply-To: <1360207935-24325-1-git-send-email-anilkumar.v@ti.com>
Hello.
On 07-02-2013 7:32, Kumar, Anil wrote:
> Update the code to use devm_* API so that driver
> core will manage resources.
> Signed-off-by: Kumar, Anil <anilkumar.v@ti.com>
> ---
> This patch applies on top of v3.8-rc6.
> Tested on da850 EVM.
> :100644 100644 e8e8724... 6ad76a3... M drivers/watchdog/davinci_wdt.c
> drivers/watchdog/davinci_wdt.c | 34 +++++++++-------------------------
> 1 files changed, 9 insertions(+), 25 deletions(-)
> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> index e8e8724..6ad76a3 100644
> --- a/drivers/watchdog/davinci_wdt.c
> +++ b/drivers/watchdog/davinci_wdt.c
[...]
> @@ -213,49 +212,34 @@ static int davinci_wdt_probe(struct platform_device *pdev)
[...]
> - size = resource_size(wdt_mem);
> - if (!request_mem_region(wdt_mem->start, size, pdev->name)) {
> - dev_err(dev, "failed to get memory region\n");
> - return -ENOENT;
> - }
> -
> - wdt_base = ioremap(wdt_mem->start, size);
> + wdt_base = devm_request_and_ioremap(&pdev->dev, wdt_mem);
> if (!wdt_base) {
> - dev_err(dev, "failed to map memory region\n");
> - release_mem_region(wdt_mem->start, size);
> - wdt_mem = NULL;
> + dev_err(&pdev->dev, "ioremap failed\n");
> return -ENOMEM;
Comment to devm_request_and_ioremap() suggest returning -EADDRNOTAVAIL
instead.
WBR, Sergei
next prev parent reply other threads:[~2013-02-07 11:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 3:32 [PATCH] watchdog: davinci_wdt: update to devm_* API Kumar, Anil
2013-02-07 11:21 ` Sergei Shtylyov [this message]
2013-02-08 2:19 ` Kumar, Anil
2013-02-08 2:19 ` Kumar, Anil
2013-02-07 17:50 ` Sekhar Nori
2013-02-08 2:35 ` Kumar, Anil
2013-02-08 2:35 ` Kumar, Anil
2013-02-08 4:19 ` Sekhar Nori
2013-02-08 4:21 ` Kumar, Anil
2013-02-08 4:21 ` Kumar, Anil
2013-02-08 5:37 ` Kumar, Anil
2013-02-08 5:37 ` Kumar, Anil
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=51138E41.3080708@mvista.com \
--to=sshtylyov@mvista.com \
--cc=anilkumar.v@ti.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.