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: 9326761 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 0120B6048B for ; Mon, 12 Sep 2016 15:28:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E79D92840A for ; Mon, 12 Sep 2016 15:28:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC2CD28954; Mon, 12 Sep 2016 15:28:31 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 D07E62840A for ; Mon, 12 Sep 2016 15:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044AbcILP23 (ORCPT ); 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 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") --- 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