From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756277AbcIOUbW (ORCPT ); Thu, 15 Sep 2016 16:31:22 -0400 Received: from avasout05.plus.net ([84.93.230.250]:51558 "EHLO avasout05.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756087AbcIOUbN (ORCPT ); Thu, 15 Sep 2016 16:31:13 -0400 X-Greylist: delayed 456 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Sep 2016 16:31:13 EDT X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=Ld9+0XXi c=1 sm=1 tr=0 a=o7Djd4SkmPXITDn8qH+ssQ==:117 a=o7Djd4SkmPXITDn8qH+ssQ==:17 a=kj9zAlcOel0A:10 a=GW1xBdLrtEIA:10 a=beXlt2xKAAAA:8 a=DayA_Ow006y9a_YDbkQA:9 a=CjuIK1q_8ugA:10 a=gcY2M4Ci8LIz02MwfSIM:22 Date: Thu, 15 Sep 2016 21:23:31 +0100 From: Nick Dyer To: Arnd Bergmann Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, Dmitry Torokhov , Andrew Duggan , Hans Verkuil , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] [media] Input: synaptics-rmi4: disallow impossible configuration Message-ID: <20160915202331.GA18925@lava.h.shmanahar.org> References: <20160912153105.3035940-1-arnd@arndb.de> <20160912153105.3035940-2-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160912153105.3035940-2-arnd@arndb.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 12, 2016 at 05:30:33PM +0200, Arnd Bergmann wrote: > 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 > -- > 2.9.0 >