From patchwork Mon Sep 12 15:30:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9326883 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9E76A60839 for ; Mon, 12 Sep 2016 15:43:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 907B628681 for ; Mon, 12 Sep 2016 15:43:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8502B28DA0; Mon, 12 Sep 2016 15:43:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2006528681 for ; Mon, 12 Sep 2016 15:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203AbcILPnS (ORCPT ); Mon, 12 Sep 2016 11:43:18 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:61023 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933657AbcILPbc (ORCPT ); Mon, 12 Sep 2016 11:31:32 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0M8M5O-1anX7X1yao-00vuZG; Mon, 12 Sep 2016 17:31:09 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, Arnd Bergmann , Dmitry Torokhov , Rob Herring , Nick Dyer , Hans de Goede , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] [media] Input: atmel_mxt: disallow impossible configuration Date: Mon, 12 Sep 2016 17:30:32 +0200 Message-Id: <20160912153105.3035940-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:M+Lj9jv5cfItcTvib3fPXLDtvVY0bjvHLWfkmsKfTnuqYNMIoUb yk5YPQAFPf/IO+GYS9ImsnMkM+2MkF2iioZBA2M7m9ScEmtFBwBxGyPWQUj9wZ4JGRggDu5 wGBt3Pj4TcoIl6yfvAJDumIfONvsrBVdSYtPWoKjMblcMrHkZbwN1YUD8dkNhx2Y8+KSTIn diNq80mpid28sivKK2IkA== X-UI-Out-Filterresults: notjunk:1; V01:K0:ZUY5N+Hvzx8=:03aIXt7lVFGRq5GmXva53e fgf5BzAMl/4t7PpuQA+ppH7nXK26YgGb3QRl7XjxinY2Whsp2fTESc41nHnUKXGTZ9N+2aAJq sWSazR4PVxDbTtVAicxcsHXyh7QvtSMOfvbaH483Vrf/DZAaPBLjTPOKNwvbS7xvD5I0OwfTu 30GA1UOacCU+Yns9oynIrWmwjbSUuYZ2veyA8nGKQmRYKJQfH7oWCjdXQmNVH3xuwsStIPe/+ PoeiPznutntDgc4nCxkRLiE8Kfe3kSu+hJaC548bKgXoEwObmy40Jn4jN+qkcV/cMf0q0HiF8 TRnc5uM+B4eEDaRMfjkbaz0+g42/9HclJsd21dC783GKcQdw/HK3pTeWJtlxRLw2IXCq/0bZj XBLM9vj2ge5qccFfjLnab1Cs0rlUKkqpHs01oVhl/PJ6JE0Vt9U/RozktpXC89XHYgCiyyEit mAzpxEtxgCxsU7kDU07GL3SA65hbJCDAIfhZ52FIyCCTAdOF0n1QUQrustDFJ8Qd1oMcc3fvp JU9nxkWEwozFI7Z+sDvvU/OxxUxnhukpMhaEx9atQM1buukzac2I6s5/QZdjnIzikzIU8P3LB 65fVVCIEQL9Y4Wq1yLrPCdOcifX5Z4L2A4FaxUqhzG8nzAkqpckIErmGetZRKyL1SSJhGo0NQ AaCTvAlTQITrDsaIUysLBG8TiX1nIXokY4XYGzu2f2ZsLQg0r72UoHdJ17Y7PvUpxG8A= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Arnd Bergmann Fixes: ecfdd7e2660e ("[media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device") Acked-by: Nick Dyer --- drivers/input/touchscreen/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index fce1e41ffe8b..ccf933969587 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -117,7 +117,8 @@ config TOUCHSCREEN_ATMEL_MXT config TOUCHSCREEN_ATMEL_MXT_T37 bool "Support T37 Diagnostic Data" - depends on TOUCHSCREEN_ATMEL_MXT && VIDEO_V4L2 + depends on TOUCHSCREEN_ATMEL_MXT + depends on VIDEO_V4L2=y || (TOUCHSCREEN_ATMEL_MXT=m && VIDEO_V4L2=m) select VIDEOBUF2_VMALLOC help Say Y here if you want support to output data from the T37