diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2012-07-31 14:09:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-08-16 20:03:19 +0100 |
commit | 390d75c1287bf68c2e29226bf8eb10ae6a08c380 (patch) | |
tree | 67b5ac8e5acfabe5c7de9bc6142bd618ace0d042 /kernel/events/internal.h | |
parent | d16f6dbddbd7a2ac40e090da1e6bb7dd9b5a1dcb (diff) | |
download | linux-390d75c1287bf68c2e29226bf8eb10ae6a08c380.tar.bz2 |
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>
Diffstat (limited to 'kernel/events/internal.h')
0 files changed, 0 insertions, 0 deletions