2012-05-05 02:37:46

by Anton Vorontsov

[permalink] [raw]
Subject: Re: [PATCH] max17042_battery: fix driver exit function

Hello Ramakrishna,

On Tue, Apr 10, 2012 at 05:20:33AM +0000, Pallala, Ramakrishna wrote:
[...]
> > power_supply_unregister(&chip->battery);
> > + if (client->irq)
> > + free_irq(client->irq, chip);
> > + i2c_set_clientdata(client, NULL);
> > +
> > return 0;
> > }
>
> I have not received any comments for this patch.
> Can I assume that this patch is in your merge queue?

Applied, but I removed i2c_set_clientdata(client, NULL) line in this
patch. It is not be required nowadays, I2C core does it by itself.

Plus, I changed the order of the calls: we should free irq first, then
unregister the power supply (btw, you might want to fix probe function
as well: it should request irq only after power supply object is
fully usable).

Thanks!

--
Anton Vorontsov
Email: [email protected]


2012-05-05 04:42:39

by Pallala, Ramakrishna

[permalink] [raw]
Subject: RE: [PATCH] max17042_battery: fix driver exit function

> On Tue, Apr 10, 2012 at 05:20:33AM +0000, Pallala, Ramakrishna wrote:
> [...]
> > > power_supply_unregister(&chip->battery);
> > > + if (client->irq)
> > > + free_irq(client->irq, chip);
> > > + i2c_set_clientdata(client, NULL);
> > > +
> > > return 0;
> > > }
> >
> > I have not received any comments for this patch.
> > Can I assume that this patch is in your merge queue?
>
> Applied, but I removed i2c_set_clientdata(client, NULL) line in this patch. It is not be
> required nowadays, I2C core does it by itself.
>
> Plus, I changed the order of the calls: we should free irq first, then unregister the
> power supply (btw, you might want to fix probe function as well: it should request irq
> only after power supply object is fully usable).

Thanks for the fix. I will look into the probe().

Thanks,
Ram
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?