[PATCH 2/3] ARM: AT91: IIO: Add AT91 ADC driver.

Lars-Peter Clausen lars at metafoo.de
Fri Oct 21 13:55:53 EDT 2011


On 10/21/2011 07:54 PM, Maxime Ripard wrote:
> [...]
>>> +static int __devexit at91adc_remove(struct platform_device *pdev)
>>> +{
>>> +	struct iio_dev *idev = platform_get_drvdata(pdev);
>>> +	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> +	struct at91adc_state *st = iio_priv(idev);
>>> +
>>> +	free_irq(st->irq, st);
>>> +	iounmap(st->reg_base);
>>> +	release_mem_region(res->start, resource_size(res));
>>> +	iio_device_unregister(idev);
>>> +
>>
>> The iio API changed a bit recently and uses a two stage unregistration now.
>> You should call iio_device_unregister before freeing resources and
>> iio_device_free afterwards.
> 
> Hmmm, I don't see the iio_device_free in Jonathan's git. Is it
> iio_free_device, or should I use another git repo/branch as base ?
> 
> Thanks,
> 

Yes, iio_free_device, sorry.

- Lars



More information about the linux-arm-kernel mailing list