From: Julia Lawall Date: Tue, 31 Jul 2012 13:09:00 +0000 (+0100) Subject: drivers/iio/adc/at91_adc.c: use devm_ functions X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~75^2~901^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=390d75c1287bf68c2e29226bf8eb10ae6a08c380;p=pandora-kernel.git 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 Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed