2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00
linux-next/drivers/iio/adc
Julia Lawall 390d75c128 drivers/iio/adc/at91_adc.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

The call to platform_get_resource(pdev, IORESOURCE_MEM, 0) is moved coser
to the call to devm_request_and_ioremap, which is th first use of the
result of platform_get_resource.

This does not use devm_request_irq to ensure that free_irq is executed
before its idev argument is freed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-08-16 20:03:19 +01:00
..
ad7266.c iio:adc: Add AD7265/AD7266 support 2012-06-30 10:15:07 +01:00
at91_adc.c drivers/iio/adc/at91_adc.c: use devm_ functions 2012-08-16 20:03:19 +01:00
Kconfig iio:adc: Add AD7265/AD7266 support 2012-06-30 10:15:07 +01:00
Makefile iio:adc: Add AD7265/AD7266 support 2012-06-30 10:15:07 +01:00