drivers/iio/adc/at91_adc.c: use devm_ functions
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 <3d4a3affaf9163789962e9770780389962bda29d@lip6.fr>
Reviewed-by: Lars-Peter Clausen <3318dc5ce3e4fb7c28a0b841b6801c884e1d0896@metafoo.de>
Signed-off-by: Jonathan Cameron <09f65b71b7655725897b2fd41a09a0cefe2e1ace@kernel.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs