staging: iio: Introduce the use of devm_ioremap_resource
authorHimangi Saraogi <himangi774@gmail.com>
Tue, 7 Jan 2014 19:44:00 +0000 (19:44 +0000)
committerJonathan Cameron <jic23@kernel.org>
Mon, 7 Jul 2014 17:12:02 +0000 (18:12 +0100)
This patch introduces the use of devm_ioremap_resource. It does away
with call to request_mem_region and the error checking on
platform_get_resource. Also, the calls to free the allocated resources
like release_mem_region and iounmap are done away with. The ret variable
in the probe function is also eliminated. Also, a bug is fixed as the
goto in the error handling of request_mem_region should not have
called release_mem_region which releases a resource that has not been
allocated.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7606_par.c

Simple merge