[PATCH v3 15/15] mfd: menelaus: Use devm_request_threaded_irq()

Felipe Balbi balbi at ti.com
Tue Dec 10 11:34:46 EST 2013


On Tue, Dec 10, 2013 at 09:30:42AM +0000, Lee Jones wrote:
> On Mon, 09 Dec 2013, Felipe Balbi wrote:
> 
> > By using devm_request_threaded_irq() we can drop a few extra lines of
> > code and rely on device managed resources layer to free our IRQ for us.
> > 
> > Tested-by: Aaro Koskinen <aaro.koskinen at iki.fi>
> > Signed-off-by: Felipe Balbi <balbi at ti.com>
> > ---
> >  drivers/mfd/menelaus.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
> > index bffe978..b87c2bd 100644
> > --- a/drivers/mfd/menelaus.c
> > +++ b/drivers/mfd/menelaus.c
> > @@ -1271,8 +1271,8 @@ static int menelaus_probe(struct i2c_client *client,
> >  	/* Set output buffer strengths */
> >  	menelaus_write_reg(m, MENELAUS_MCT_CTRL1, 0x73);
> >  
> > -	err = request_threaded_irq(client->irq, NULL, menelaus_irq,
> > -			IRQF_ONESHOT, DRIVER_NAME, m);
> > +	err = devm_request_threaded_irq(&client->dev, client->irq,
> > +			NULL, menelaus_irq, IRQF_ONESHOT, DRIVER_NAME, m);
> 
> No need for a separate patch here. Convert straight from request_irq()
> to devm_request_threaded_irq() in patch 3.

that would be 2 changes in a single patch.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131210/97329829/attachment-0001.sig>


More information about the linux-arm-kernel mailing list