[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F3DBB1B3EF102E4994C89758CFCA32412C5A63@DBDE01.ent.ti.com>
Date: Fri, 8 Feb 2013 04:21:10 +0000
From: "Kumar, Anil" <anilkumar.v@...com>
To: "Nori, Sekhar" <nsekhar@...com>
CC: "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"davinci-linux-open-source@...ux.davincidsp.com"
<davinci-linux-open-source@...ux.davincidsp.com>,
"wim@...ana.be" <wim@...ana.be>
Subject: RE: [PATCH] watchdog: davinci_wdt: update to devm_* API
On Fri, Feb 08, 2013 at 09:49:27, Nori, Sekhar wrote:
> On 2/8/2013 8:05 AM, Kumar, Anil wrote:
> > On Thu, Feb 07, 2013 at 23:20:48, Nori, Sekhar wrote:
> >> 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@...com>
>
> >>> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
>
> >>> @@ -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?
> >
> > Actually, I have not found any particular need to take pointer
> > into dev and then use in the code. Rather we can directly use.
>
> No, it is good enough as-is. It will help rid your patch of unnecessary
> changes and its not really convenient to to keep reading &pdev->dev all
> the time.
>
Ok
Thanks,
Anil
Powered by blists - more mailing lists