From: Sekhar Nori <nsekhar@ti.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, 7 Feb 2013 23:20:48 +0530 [thread overview]
Message-ID: <5113E978.2060201@ti.com> (raw)
In-Reply-To: <1360207935-24325-1-git-send-email-anilkumar.v@ti.com>
On 2/7/2013 9:02 AM, 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
> @@ -69,7 +69,6 @@ static unsigned long wdt_status;
> #define WDT_REGION_INITED 2
> #define WDT_DEVICE_INITED 3
>
> -static struct resource *wdt_mem;
> static void __iomem *wdt_base;
> struct clk *wdt_clk;
>
> @@ -201,10 +200,10 @@ static struct miscdevice davinci_wdt_miscdev = {
>
> static int davinci_wdt_probe(struct platform_device *pdev)
> {
> - int ret = 0, size;
> - struct device *dev = &pdev->dev;
Its not clear why you had to drop use of this variable?
> + int ret = 0;
> + static struct resource *wdt_mem;
>
> - wdt_clk = clk_get(dev, NULL);
> + wdt_clk = clk_get(&pdev->dev, NULL);
When you are converting to use devres, why not convert this to
devm_clk_get() as well?
Thanks,
Sekhar
next prev parent reply other threads:[~2013-02-07 17:51 UTC|newest]
Thread overview: 8+ 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
2013-02-07 17:50 ` Sekhar Nori [this message]
2013-02-08 2:35 ` Kumar, Anil
2013-02-08 4:19 ` Sekhar Nori
2013-02-08 4:21 ` 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=5113E978.2060201@ti.com \
--to=nsekhar@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).