Title: [8141] trunk/drivers/input/touchscreen/ad7879.c: [#5782] Export auxiliary GPIO on the AD7879 to gpiolib
Revision
8141
Author
hennerich
Date
2010-01-11 07:35:31 -0500 (Mon, 11 Jan 2010)

Log Message

[#5782] Export auxiliary GPIO on the AD7879 to gpiolib
LKML feedback by Dmitry Torokhov:
Add missing gpiochip_remove()

Modified Paths

Diff

Modified: trunk/drivers/input/touchscreen/ad7879.c (8140 => 8141)


--- trunk/drivers/input/touchscreen/ad7879.c	2010-01-11 07:55:23 UTC (rev 8140)
+++ trunk/drivers/input/touchscreen/ad7879.c	2010-01-11 12:35:31 UTC (rev 8141)
@@ -520,6 +520,17 @@
 
 static int __devexit ad7879_destroy(bus_device *bus, struct ad7879 *ts)
 {
+
+#ifdef CONFIG_GPIOLIB
+	struct ad7879_platform_data *pdata = bus->dev.platform_data;
+	int err;
+	if (pdata->gpio_export) {
+		err = gpiochip_remove(&ts->gc);
+		if (err)
+			dev_err(&bus->dev, "failed to remove gpio %d\n",
+				ts->gc.base);
+	}
+#endif
 	ad7879_disable(ts);
 	sysfs_remove_group(&ts->bus->dev.kobj, &ad7879_attr_group);
 	free_irq(ts->bus->irq, ts);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to