From patchwork Mon Sep 12 15:26:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101810 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp907118qgf; Mon, 12 Sep 2016 08:28:31 -0700 (PDT) X-Received: by 10.66.150.39 with SMTP id uf7mr34460490pab.23.1473694111003; Mon, 12 Sep 2016 08:28:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xq1si22137936pab.11.2016.09.12.08.28.30; Mon, 12 Sep 2016 08:28:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044AbcILP23 (ORCPT + 1 other); Mon, 12 Sep 2016 11:28:29 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:53240 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755984AbcILP22 (ORCPT ); Mon, 12 Sep 2016 11:28:28 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0McRym-1bRnmA3hVg-00HbhR; Mon, 12 Sep 2016 17:28:06 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , Dmitry Torokhov , 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:26:44 +0200 Message-Id: <20160912152801.2972665-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:8ZBlXGjJqmHmoS/dpIN7hsFI2oTJ4NN0l1IReyJV7cWSMVeGCMK hUS3XREKu8goIoRNtxrCB8el0h4fMndSmiOwAvO2AEHYAGPVQB/rboixi1B2bCltUi6RlyX DN04jSlU1cjL/jSPZyrrlnHWP4sWzIiA2CMiwVtFuwJX5EPPi2SEHCnvksw7cW0GZ2gFYjc 3cZp+y/P5c3rilNiupOKQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:VzE7uBRKWSo=:7+Hi+lQQipT46rKpZ7+dXi ZErir+NcUS8JUYt0xiv31cQVgqZYiZ2dvLLj2QCBdIlXAaf/4FeMi1nk6rbQQd4MoWep9IgIk 5fsy1Ve/Lcloc7BqBI7Y95VI9B7uRlxSWuuMhATWnFZ26mhSFDJQCLinmeeMSoVO2j6XN7+Ce y/zHrREsAzIW4wecOwsGdHMX/+m86alDJhuWhu9NAHUNoZLEsH7w5eyXllr3qRxmMpZd5zLtP e1HTxv/AXbbkskhgu0hSZoF5yBrEVGSf7T0PmqVzJ0A+6SPVlwzjs5doBJgqCEmWWS7dRHhzl SoNfjAMOtq7JQZEhGFZ88bRcqVlBcMBBYrWi53fNPEqM6FGPIEC8gfDt7ap/W40KSVt2LZTPP 4m/f+sBZDX0bB5ToIIqYcmyFBRy75srQq8vrSv987g+wroeX2URK0Lmqcq1hq9w0TRAl0ynCr cnpp95uMGvhvBBYlHUO2uLB+DtF3qJ7lDh6enb74H4by6xHwdkLvQ6OfwoxSHErTPP44sN8h7 xTEatqPbLAZCqknM0m97Gb90llKub2kjHaoqjOMgXcOQcGKPR49eMNPFeih+aZtUl3XFMPab2 8/YHj5FSKEieS8l3/mEIB0+BWvmz0FxKXK/pfhzVp5dWxzsA6EgyeJxwdBig/Uhe7G151VihZ 1pN6rzD1cvnq/bMb4Zy+Sil07DBDFM4DpYZITVntEmpOHXq75JD5CK7DPcF7PUM92hDM= Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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") --- drivers/input/touchscreen/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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