[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <000a01ce0f41$575e6ce0$061b46a0$%han@samsung.com>
Date: Wed, 20 Feb 2013 17:07:35 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Dmitry Torokhov' <dmitry.torokhov@...il.com>
Cc: 'Samuel Ortiz' <sameo@...ux.intel.com>,
linux-kernel@...r.kernel.org, 'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH 10/11] mfd: tps65010: use devm_request_irq() and
devm_kzalloc()
On Wednesday, February 20, 2013 4:35 PM, Dmitry Torokhov wrote:
> -----Original Message-----
> From: Dmitry Torokhov [mailto:dmitry.torokhov@...il.com]
> Sent: Wednesday, February 20, 2013 4:35 PM
> To: Jingoo Han
> Cc: 'Samuel Ortiz'; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH 10/11] mfd: tps65010: use devm_request_irq() and devm_kzalloc()
>
> On Wed, Feb 20, 2013 at 03:14:05PM +0900, Jingoo Han wrote:
> > Use devm_request_irq() and devm_kzalloc() to make cleanup paths
> > more simple.
> >
> > Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> > ---
> > drivers/mfd/tps65010.c | 15 +++++----------
> > 1 files changed, 5 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c
> > index da2691f..a5438cc 100644
> > --- a/drivers/mfd/tps65010.c
> > +++ b/drivers/mfd/tps65010.c
> > @@ -525,11 +525,8 @@ static int __exit tps65010_remove(struct i2c_client *client)
> > dev_dbg(&client->dev, "board %s %s err %d\n",
> > "teardown", client->name, status);
> > }
> > - if (client->irq > 0)
> > - free_irq(client->irq, tps);
> > cancel_delayed_work_sync(&tps->work);
> > debugfs_remove(tps->file);
> > - kfree(tps);
> > the_tps = NULL;
> > return 0;
>
> Nope, again work and IRQ have to be handled in certain order.
Yes, you're right.
I will use devm_free_irq()
>
> Thanks.
>
> --
> Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists