All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kumar, Anil" <anilkumar.v@ti.com>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"davinci-linux-open-source@linux.davincidsp.com" 
	<davinci-linux-open-source@linux.davincidsp.com>,
	"wim@iguana.be" <wim@iguana.be>
Subject: RE: [PATCH] watchdog: davinci_wdt: update to devm_* API
Date: Fri, 8 Feb 2013 02:19:25 +0000	[thread overview]
Message-ID: <F3DBB1B3EF102E4994C89758CFCA32412C59AA@DBDE01.ent.ti.com> (raw)
In-Reply-To: <51138E41.3080708@mvista.com>

Hi Sergei

On Thu, Feb 07, 2013 at 16:51:37, Sergei Shtylyov wrote:
> 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.

Right. 

Thanks,
Anil

WARNING: multiple messages have this Message-ID (diff)
From: "Kumar, Anil" <anilkumar.v@ti.com>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"davinci-linux-open-source@linux.davincidsp.com"
	<davinci-linux-open-source@linux.davincidsp.com>,
	"wim@iguana.be" <wim@iguana.be>
Subject: RE: [PATCH] watchdog: davinci_wdt: update to devm_* API
Date: Fri, 8 Feb 2013 02:19:25 +0000	[thread overview]
Message-ID: <F3DBB1B3EF102E4994C89758CFCA32412C59AA@DBDE01.ent.ti.com> (raw)
In-Reply-To: <51138E41.3080708@mvista.com>

Hi Sergei

On Thu, Feb 07, 2013 at 16:51:37, Sergei Shtylyov wrote:
> 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.

Right. 

Thanks,
Anil
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-02-08  2:19 UTC|newest]

Thread overview: 13+ 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
2013-02-08  2:19   ` Kumar, Anil [this message]
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: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=F3DBB1B3EF102E4994C89758CFCA32412C59AA@DBDE01.ent.ti.com \
    --to=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=sshtylyov@mvista.com \
    --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.