[UPSTREAM] Attempt at improving ADC access

Balaji Rao balajirrao at openmoko.org
Thu Oct 16 22:18:07 CEST 2008

On Thu, Oct 16, 2008 at 06:05:22PM -0200, Werner Almesberger wrote:
> Balaji Rao wrote:
> > How does this look now ?
> Lean and mean :-) You could make it even leaner by just calling
> adc_async_read from adc_sync_read. And I think you may have a
> double kfree in adc_sync_read/pcf50633_work, don't you ?

To call adc_async_read from adc_sync_read we need to pass the adc_request as
a callback param, which we won't be able to do as it's created inside
async_read. Sure, another layer of indirection can solve this :) But I
don't think it's worth it.

Yes, there's a double free out there! Thanks for noticing it.

	- Balaji

More information about the openmoko-kernel mailing list