staging:iio:trigger:gpio bug in release of gpio in error path
authorJonathan Cameron <jic23@kernel.org>
Sun, 2 Jun 2013 19:00:00 +0000 (20:00 +0100)
committerJonathan Cameron <jic23@kernel.org>
Tue, 4 Jun 2013 17:30:56 +0000 (18:30 +0100)
Also dropped the unneeded gpio.h header.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
drivers/staging/iio/trigger/iio-trig-gpio.c

index 7c593d18a91079fd9fd557596dc1a274bb136eb8..69dabca0f4e8efa5540a1440f87da2bd43f4195a 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
-#include <linux/gpio.h>
 #include <linux/slab.h>
 
 #include <linux/iio/iio.h>
@@ -122,7 +121,7 @@ error_free_completed_registrations:
                                 &iio_gpio_trigger_list,
                                 alloc_list) {
                trig_info = iio_trigger_get_drvdata(trig);
-               free_irq(gpio_to_irq(trig_info->irq), trig);
+               free_irq(trig_info->irq, trig);
                kfree(trig_info);
                iio_trigger_unregister(trig);
        }