[PATCH] Input: Let the FT5x06 driver build without debugfs

From: Eric W. Biederman
Date: Thu Aug 16 2012 - 20:15:20 EST



When testing to make certain my user namespace code works
in various configurations I tripped over the tf5x06.c not
building with debugfs disabled.

drivers/input/touchscreen/edt-ft5x06.c: In function âedt_ft5x06_ts_removeâ:
drivers/input/touchscreen/edt-ft5x06.c:846:14: error: âstruct edt_ft5x06_ts_dataâ has no member named âraw_bufferâ

Fix the build by placing an #ifdef around the problem kfree.

Signed-off-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
---
drivers/input/touchscreen/edt-ft5x06.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 9afc777..bc160b3 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -843,7 +843,9 @@ static int __devexit edt_ft5x06_ts_remove(struct i2c_client *client)
if (gpio_is_valid(pdata->reset_pin))
gpio_free(pdata->reset_pin);

+#if defined(CONFIG_DEBUG_FS)
kfree(tsdata->raw_buffer);
+#endif
kfree(tsdata);

return 0;
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/