From patchwork Mon Sep 12 15:30:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9326869 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 7BFC060839 for ; Mon, 12 Sep 2016 15:40:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BC5F289E0 for ; Mon, 12 Sep 2016 15:40:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B01828D8F; Mon, 12 Sep 2016 15:40:41 +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 33CAA289E0 for ; Mon, 12 Sep 2016 15:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933001AbcILPkH (ORCPT ); Mon, 12 Sep 2016 11:40:07 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:53896 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932616AbcILPcG (ORCPT ); Mon, 12 Sep 2016 11:32:06 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MUjoe-1bXLi32YSy-00Y9Wu; Mon, 12 Sep 2016 17:31:39 +0200 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, Arnd Bergmann , Dmitry Torokhov , Andrew Duggan , Hans Verkuil , Nick Dyer , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] [media] Input: synaptics-rmi4: disallow impossible configuration Date: Mon, 12 Sep 2016 17:30:33 +0200 Message-Id: <20160912153105.3035940-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160912153105.3035940-1-arnd@arndb.de> References: <20160912153105.3035940-1-arnd@arndb.de> X-Provags-ID: V03:K0:QJl2tw77su8LAUtskfX1mgwNGhaGdcxRRipAkCNlLZyugbMcvrn qByB+y7XLjiM3rF5Ka1x6mjXrHQ0gxxYUh5X4HoYhybuyUNTGqxwa43htUbVzAeri7szkCX UTPK3XnpKQWChDxRO+JvGHw5kEpd7CVfPsJqkKm6giCoT3zl2rjJo09/pKrr1GukyJf3CgI 9XkermSJdEym6jKiORF+A== X-UI-Out-Filterresults: notjunk:1; V01:K0:COyyJzZWoRg=:zG6N4281nxXCmhTzzSouM/ y/Uu+j44q1/fn3WHeHnhT7WStOHk878oHYu2ydHynuR5Py3ZcjeSUHjkOekbPRnaeyCobAfnv UVzgrnnY7kICmMomYv4cQ3fC+eqFYHF7EYpRfawkWoKCX0epqs0eZdJk7bfK2efKSnEwWT149 cGh8yVR1AKgWg4XzWgGmr+ibSCHG0FAtU/JAbk/fB9zR+5dfhhWtArlRl6wH7pFnXf6Ka+zj+ tGmM6AzZxOvWx3okp6EV2BivP5aVxpGnSxVgKymsnkpYarxTCEzXmD6WAmAmsqVdYN/hG6+Vh iQMpSeSBwa2FsqB4cz4wx/7BNlfcrdKENc4XXPIoysvfHWW/pdQmmE2uWiMoNZjkL2JqetluE 3r1qw6XX6X1GiAgJKfNNT+a9FVtoXwgH6vUUnx33jjRIAE/8QEa9Chtd1CtmD9a15B2cFdg+V FmnoqBoZ5iEED2tycwD9zqmAQ2xK3i8Et/KDFDyKuzHXtcXUlrTlmqhtEwe91/5L3WZLlycSY MUrgY3nSFDRUqPiyDRMOdhR2bNPATCwK30lDvqlnipLTqRAhVJO9Mnbr7be0SiHEpDHap7YNd FMc3ZmLhDq6h5W007PAyCQ1wYqzpsjVTRdpR4+0A+eERJPM7bOholQbWnVSP7wy/tcr5CkGS7 dFo6ATjaX4K52fh/6GE5/pC01hwLGjoPckLZidUSR1IrLOsJJg+WywUIrEiwyd9re7y0= 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 newly added debug mode for the synaptics-rmi4 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/rmi4/rmi_core.o: In function `rmi_f54_remove': rmi_f54.c:(.text.rmi_f54_remove+0x14): undefined reference to `video_unregister_device' rmi_f54.c:(.text.rmi_f54_remove+0x20): undefined reference to `v4l2_device_unregister' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_s_input': rmi_f54.c:(.text.rmi_f54_vidioc_s_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_g_input': rmi_f54.c:(.text.rmi_f54_vidioc_g_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_fmt': rmi_f54.c:(.text.rmi_f54_vidioc_fmt+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_enum_input': rmi_f54.c:(.text.rmi_f54_vidioc_enum_input+0x10): undefined reference to `video_devdata' drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_querycap': ... 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: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics") Acked-by: Nick Dyer --- drivers/input/rmi4/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/rmi4/Kconfig b/drivers/input/rmi4/Kconfig index f3418b65eb41..4c8a55857e00 100644 --- a/drivers/input/rmi4/Kconfig +++ b/drivers/input/rmi4/Kconfig @@ -65,7 +65,7 @@ config RMI4_F30 config RMI4_F54 bool "RMI4 Function 54 (Analog diagnostics)" depends on RMI4_CORE - depends on VIDEO_V4L2 + depends on VIDEO_V4L2=y || (RMI4_CORE=m && VIDEO_V4L2=m) select VIDEOBUF2_VMALLOC help Say Y here if you want to add support for RMI4 function 54