From patchwork Mon Dec 11 11:30:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10104823 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 A6257602D8 for ; Mon, 11 Dec 2017 11:31:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68DC329546 for ; Mon, 11 Dec 2017 11:31:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D8732954A; Mon, 11 Dec 2017 11:31: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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 DFC2929546 for ; Mon, 11 Dec 2017 11:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbdLKLbT (ORCPT ); Mon, 11 Dec 2017 06:31:19 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:53909 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbdLKLbO (ORCPT ); Mon, 11 Dec 2017 06:31:14 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0Ll0b7-1ewrlt1xAr-00alZt; Mon, 11 Dec 2017 12:31:04 +0100 From: Arnd Bergmann To: Felipe Balbi , Greg Kroah-Hartman Cc: linux-media@vger.kernel.org, Arnd Bergmann , Ruslan Bilovol , Hannes Reinecke , Bart Van Assche , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] usb: gadget: webcam: fix V4L2 Kconfig dependency Date: Mon, 11 Dec 2017 12:30:14 +0100 Message-Id: <20171211113048.3514863-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171211113048.3514863-1-arnd@arndb.de> References: <20171211113048.3514863-1-arnd@arndb.de> X-Provags-ID: V03:K0:SP8vyMVYH9+yKAfXCQ7hRLjDn6X6zyO4UE2oW+c1WTjD5Vvat4b gOelqywgmKSjxgUpNenw9iOmV9FW94K6t5VzX5UcBzaO6DPi+grxVSRJoUUDEzYqJfsTaKV lYbI9osgcKV9lR2LmaevQ2FSi/0jdGsKfOVzU2/VefiR/UGaKat36QkTgis2Y4NbGaUyyAb ahpgjNTaLbVKUWSqqyDjQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:798/F/Kicu4=:dKwU0dCzkfUhmBTASXaAal Tax5uAKZCbLbRbzydtBOeMvJX9QGnzJ+PTHgSrF6FcSa33U7X6aA7EdOMgUJRDz8oGJrvlR3s DJbP9OGSFrXKzuqECMI2IAeUnE2ecZSer86rKRMiUBUcz3HA1v/8Y+qV9ek/qXBcctjrpSX+s eKSRhT7OidS98bHdHi5oIWsLOFal08Qtses7Qr02z8jZNLYzgeWB6b5F7aDsciU/1Yd4lkUF5 aN3OD8KObIKsMIgLz8Ok8oaH2/Y3Q/rqktAJzg6JX+2iNYWofeaSTcI0qYOm7xfyMbcjUVhpG nZxN841aDHAqeDm6skm1YE5KgSITbQqdxYj+IybE3I3w52s7aeH5LoMnkaHRFKycdUDPw3CEO IvZ93dirAbLllilhRvHC3oTjB63C7IrNVR/FRSOsy8Hklc2xTXYj7Jcc0GuiTIVXfr77UOheJ /Pq2FO7vpABj6RIBfdqQerAwlP3rCkRVBfhSVokk5CvjTwJFJ5kLQh02ADfnsqQIwzyVDdGLB gPkDKOVX7WmvOLPiMOqKULhYCOZsBFX8b3EhvF4b1O8qWQdPQ09JV46079NH7DIJA3s6KhPUy ylQgHscy9JR5KUj9BFG7r3XAFIah3LcBJ6bUs4Yq9GphKswPEIss0aWrE4cXSyfI9Oq6VHe09 ZgD7H/2AX9dlEo/H5mpLK3Wshr6GfKwocG1R8vouuvAYcaTJuhIlaoHMIV6qSMRcGEdSkqiM/ JR/TinRwx7o8ylnb2PeIlvLxfpxdWGZJZOsw7A== 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 Configuring the USB_G_WEBCAM driver as built-in leads to a link error when CONFIG_VIDEO_V4L2 is a loadable module: drivers/usb/gadget/function/f_uvc.o: In function `uvc_function_setup': f_uvc.c:(.text+0xfe): undefined reference to `v4l2_event_queue' drivers/usb/gadget/function/f_uvc.o: In function `uvc_function_ep0_complete': f_uvc.c:(.text+0x188): undefined reference to `v4l2_event_queue' This changes the Kconfig dependency to disallow that configuration, and force it to be a module in that case as well. This is apparently a rather old bug, but very hard to trigger even in thousands of randconfig builds. Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/legacy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/Kconfig b/drivers/usb/gadget/legacy/Kconfig index 2d80a9d1d5d9..fbd974965399 100644 --- a/drivers/usb/gadget/legacy/Kconfig +++ b/drivers/usb/gadget/legacy/Kconfig @@ -513,7 +513,7 @@ endif # or video class gadget drivers), or specific hardware, here. config USB_G_WEBCAM tristate "USB Webcam Gadget" - depends on VIDEO_DEV + depends on VIDEO_V4L2 select USB_LIBCOMPOSITE select VIDEOBUF2_VMALLOC select USB_F_UVC