From patchwork Sun Feb 28 20:51:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8447871 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 497D29F372 for ; Sun, 28 Feb 2016 20:53:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6685E202FE for ; Sun, 28 Feb 2016 20:53:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A162202DD for ; Sun, 28 Feb 2016 20:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755199AbcB1Uwv (ORCPT ); Sun, 28 Feb 2016 15:52:51 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:55376 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755163AbcB1Uwu (ORCPT ); Sun, 28 Feb 2016 15:52:50 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MH3Li-1ae0C11ai2-00Dmaf; Sun, 28 Feb 2016 21:52:11 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] v4l2/dvb: allow v4l2_mc functions to be used by dvb Date: Sun, 28 Feb 2016 21:51:48 +0100 Message-Id: <1456692724-751344-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:pyosFtEYEW6junQEE9KHtVkzvWGICNoq/ZPIqY2vS3zb/pOZIkT bHLUL7DWWQ4GaNe2at0yUTRpFDdyJhwNOyHaarU7bEkngmHcWC7GojUAHmcnhiPJYpIM7LA 5kA8lr4TsMJI7bW6yDqXqlmi/naiW4dIErtLk1eb6Hr9XTE2RT5kBSmo2GmV2B7QMpj6Jq/ 2u5JbD4hUGo38rJrUAfSA== X-UI-Out-Filterresults: notjunk:1; V01:K0:xcdhJo1yVos=:mrCI8854Os8Ra6e1rx0KEU xNojU2MG5NYG9wwNZTcNE4dmgJnrCGs/I5btDoJ8BrDnJhTDWIHonmXD8kaK7UoVK1J3bWkCz /zXW7Xsf1vxQvsog0Sf/cCp/zmgzzHfrgK6tYZ6iB79pTPwgP7fu/y3o+AgFaiwbwhS4l4HaO XGvZY2XpHCpNkg6C53WzeGL+b+2Lbt2aNpO6DAVaqWvZM/mDIMWFS2Q5ZvwAm94FtaxYW4P4c 3GvN9vX5uNAgZnYFAH5iVAb/9RFRH0ZJIAwmPkioADWPDHpz14FEEEkSR3NdFLeSmtAiQVvit jn0m4K/fNxSKGMpv4M4pZAht9doXIWO6vvarR0YiIjywuuA75cbyAMpoP+DtFzqg0OZPgOsT7 MAv8T359QtZmQYTA3lN5jNgtJQcnskiH1bvDyGkKNjSEy2XMekyfVVbp43R/5j2nUNlaKk3TG w/zaqvJBMvDBssAgK6Emey42W1TfO0LfFgh9ISRGLvNakkZnATEjT/5E0oMqXu2w/a6ofhE7T bH89yzLAE0dd5rCXjrUhIHNG24df1sWF544hWUP+yyHHtUi/iFXyjP7v1g6/ioha/P3sRnbgo iyq9RZT5s6kAwDD7oF4dSa5otCvz2yWcXVH9zq3OiNCNEgrAxd1MO8nmT7nH5VVJgAvz7Csuu SbUoCvniaOu6vNi86DFBuuGI8czX9rqvfpiffopXddPWrjYWO+cyC8Krl1MmQHW9KBfk= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In a configuration that supports all DVB drivers but that disables V4L2 or builds it as a loadable module, we get link errors because of the recent change to use __v4l2_mc_usb_media_device_init: drivers/media/built-in.o: In function `dvb_usb_adapter_dvb_init': :(.text+0xe7966): undefined reference to `__v4l2_mc_usb_media_device_init' drivers/media/built-in.o: In function `dvb_usbv2_init': :(.text+0xff1cc): undefined reference to `__v4l2_mc_usb_media_device_init' drivers/media/built-in.o: In function `smsusb_init_device': :(.text+0x113be4): undefined reference to `__v4l2_mc_usb_media_device_init' drivers/media/built-in.o: In function `au0828_usb_probe': :(.text+0x114d08): undefined reference to `__v4l2_mc_usb_media_device_init' This patch is one way out, by simply building the v4l2-mc.c file whenever at least one of VIDEO_V4L2 or DVB_CORE are enabled, including the case that one of them is a module and the other is built-in, which leads the MC code to become built-in as well. Signed-off-by: Arnd Bergmann --- drivers/media/Makefile | 2 +- drivers/media/v4l2-core/Makefile | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/Makefile b/drivers/media/Makefile index e608bbce0c35..16d471a56c0f 100644 --- a/drivers/media/Makefile +++ b/drivers/media/Makefile @@ -19,7 +19,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y) endif obj-$(CONFIG_VIDEO_DEV) += v4l2-core/ -obj-$(CONFIG_DVB_CORE) += dvb-core/ +obj-$(CONFIG_DVB_CORE) += dvb-core/ v4l2-core/ # There are both core and drivers at RC subtree - merge before drivers obj-y += rc/ diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile index 795a5352761d..c26472f9950e 100644 --- a/drivers/media/v4l2-core/Makefile +++ b/drivers/media/v4l2-core/Makefile @@ -16,7 +16,11 @@ endif ifeq ($(CONFIG_TRACEPOINTS),y) videodev-objs += vb2-trace.o v4l2-trace.o endif -videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o + +ifdef CONFIG_MEDIA_CONTROLLER +obj-$(CONFIG_VIDEO_V4L2) += v4l2-mc.o +obj-$(CONFIG_DVB_CORE) += v4l2-mc.o +endif obj-$(CONFIG_VIDEO_V4L2) += videodev.o obj-$(CONFIG_VIDEO_V4L2) += v4l2-common.o @@ -28,6 +32,7 @@ obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o obj-$(CONFIG_V4L2_FLASH_LED_CLASS) += v4l2-flash-led-class.o +ifdef CONFIG_VIDEO_V4L2 obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o @@ -40,6 +45,7 @@ obj-$(CONFIG_VIDEOBUF2_VMALLOC) += videobuf2-vmalloc.o obj-$(CONFIG_VIDEOBUF2_DMA_CONTIG) += videobuf2-dma-contig.o obj-$(CONFIG_VIDEOBUF2_DMA_SG) += videobuf2-dma-sg.o obj-$(CONFIG_VIDEOBUF2_DVB) += videobuf2-dvb.o +endif ccflags-y += -I$(srctree)/drivers/media/dvb-core ccflags-y += -I$(srctree)/drivers/media/dvb-frontends