LP8727 driver should be patched for several reasons.
(a) Need to clean up _probe()/_remove()
(b) Not secure code when the platform data is NULL
(c) Interrupt handling
Two threads are running for handling one IRQ.
One is for the IRQ pin, the other is used for delayed processing.
This is unusual and can be enhanced.
(d) Misuse of mutex code
(e) Lots of definitions should be fixed
(f) Others..
Bunch of code patches are as below.
[PATCH 1/8] lp8727_charger: use devm_kzalloc() rather than
kzalloc()/kfree()
[PATCH 2/8] lp8727_charger: cleanup _probe() and _remove()
[PATCH 3/8] lp8727_charger: fix buggy code when the platform data is
NULL
[PATCH 4/8] lp8727_charger: cleanup the interrupt handler code
[PATCH 5/8] lp8727_charger: move the mutex code
[PATCH 6/8] lp8727_charger: fix code for getting battery temperature
[PATCH 7/8] lp8727_charger: cleanup definitions
[PATCH 8/8] lp8727_charger: make cosmetic code
Best Regards,
Milo
On Thu, Aug 30, 2012 at 11:37:16AM +0000, Kim, Milo wrote:
> LP8727 driver should be patched for several reasons.
>
> (a) Need to clean up _probe()/_remove()
> (b) Not secure code when the platform data is NULL
> (c) Interrupt handling
> Two threads are running for handling one IRQ.
> One is for the IRQ pin, the other is used for delayed processing.
> This is unusual and can be enhanced.
> (d) Misuse of mutex code
> (e) Lots of definitions should be fixed
> (f) Others..
Thanks a lot for the cleanups, this is much appreciated! The cleanups
themselves look great, but I'd really like to see them more separated.
Thanks,
Anton.
> -----Original Message-----
> From: Anton Vorontsov [mailto:[email protected]]
> Sent: Thursday, August 30, 2012 9:15 PM
> To: Kim, Milo
> Cc: [email protected]; David Woodhouse
> Subject: Re: [PATCH 0/8] lp8727_charger: cleanup code
>
> On Thu, Aug 30, 2012 at 11:37:16AM +0000, Kim, Milo wrote:
> > LP8727 driver should be patched for several reasons.
> >
> > (a) Need to clean up _probe()/_remove()
> > (b) Not secure code when the platform data is NULL
> > (c) Interrupt handling
> > Two threads are running for handling one IRQ.
> > One is for the IRQ pin, the other is used for delayed processing.
> > This is unusual and can be enhanced.
> > (d) Misuse of mutex code
> > (e) Lots of definitions should be fixed
> > (f) Others..
>
> Thanks a lot for the cleanups, this is much appreciated! The cleanups
> themselves look great, but I'd really like to see them more separated.
>
> Thanks,
> Anton.
Sorry to bother you.
I'll resend the patch-set separately.
Thanks a lot for detailed review.
Best Regards,
Milo
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?