[media] Input: atmel_mxt: disallow impossible configuration
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Sep 2016 15:30:32 +0000 (12:30 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 19 Sep 2016 19:24:22 +0000 (16:24 -0300)
commit7a4b9a29f8e5e16c28dbc56a8d2da7b6b3e482c7
tree36bdb6465b82b1e8f1209f51201b2194e11dfb5f
parent96105144475eeafa8445d2f9f3077a39dd7369a5
[media] Input: atmel_mxt: disallow impossible configuration

The newnly added debug mode for the atmel_mxt_ts driver relies on
the v4l2 interface and vb2_vmalloc, but those might be configured
as loadable modules when the driver itself is built-in, resulting
in a link failure:

drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_vidioc_querycap':
atmel_mxt_ts.c:(.text.mxt_vidioc_querycap+0x10): undefined reference to `video_devdata'
drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_buffer_queue':
atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x20): undefined reference to `vb2_plane_vaddr'
atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x164): undefined reference to `vb2_buffer_done'
drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_free_object_table':
atmel_mxt_ts.c:(.text.mxt_free_object_table+0x18): undefined reference to `video_unregister_device'
atmel_mxt_ts.c:(.text.mxt_free_object_table+0x20): undefined reference to `v4l2_device_unregister'

The best workaround I could come up with is to disallow the debug
mode unless it's actually possible to call it.

Fixes: ecfdd7e2660e ("[media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nick Dyer <nick@shmanahar.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/input/touchscreen/Kconfig