From patchwork Wed Apr 20 06:36:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 564685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AACDC433F5 for ; Wed, 20 Apr 2022 06:36:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348107AbiDTGjf (ORCPT ); Wed, 20 Apr 2022 02:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235577AbiDTGjd (ORCPT ); Wed, 20 Apr 2022 02:39:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A11C8167C3; Tue, 19 Apr 2022 23:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=JBXsl+mIATRCufdITmGTK7ymrd2L37dxDsu//jC6hbo=; b=1ugSkmXxYniz3j3eOGVH62DtMn ID7m2g6IITyaYw6VLRbde7ww6RM6JW7W5QHgyxFQP95RMQFzaNv/kGLl2nxWEDjlwjxP2YQuPy74J 6IyY5SuNqUi7nZrYGUv+MuZWzw1vOEA1+Iiw+Vbp8X3KmKm1O3yEV8GlXiS2aQQxRug+pCPu0XkAz 1VghU01vBl1TL/VrZAkbwSoaMYDrS9IA+dmNXEm3D0BA4kWp5zVzMDO5pTkt1xZMwmBAqj77ZV48d OlVB6ZuinUm9Rj00Hd/2snHZ9efjMB30v/MAEtN9wroEK7wsRXC/MH/juGJ2rXFD8Ygm6ZYIbzh0z 3ogvOZxA==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh3xF-007a6R-CB; Wed, 20 Apr 2022 06:36:45 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , kernel test robot , Mauro Carvalho Chehab , Laurent Pinchart , Jacopo Mondi , Neil Armstrong , linux-media@vger.kernel.org Subject: [PATCH] media: make RADIO_ADAPTERS tristate Date: Tue, 19 Apr 2022 23:36:44 -0700 Message-Id: <20220420063644.17758-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix build errors when RADIO_TEA575X=y, VIDEO_BT848=m, and VIDEO_DEV=m. The build errors occur due to [in drivers/media/Makefile]: obj-$(CONFIG_VIDEO_DEV) += radio/ so the (would be) builtin tea575x.o is not being built. This is also due to drivers/media/radio/Kconfig declaring a bool Kconfig symbol (RADIO_ADAPTERS) that depends on a tristate (VIDEO_DEV), so when VIDEO_DEV=m, RADIO_ADAPTERS becomes =y, and then the drivers that depend on RADIO_ADPATERS can be configured as builtin (=y) or as loadable modules (=m). Fix this by converting RADIO_ADAPTERS to a tristate symbol instead of a bool symbol. Fixes these build errors: ERROR: modpost: "snd_tea575x_hw_init" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_set_freq" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_s_hw_freq_seek" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_enum_freq_bands" [drivers/media/pci/bt8xx/bttv.ko] undefined! ERROR: modpost: "snd_tea575x_g_tuner" [drivers/media/pci/bt8xx/bttv.ko] undefined! Fixes: 9958d30f38b9 ("media: Kconfig: cleanup VIDEO_DEV dependencies") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: lore.kernel.org/r/202204191711.IKJJFjgU-lkp@intel.com Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: Jacopo Mondi Cc: Neil Armstrong Cc: linux-media@vger.kernel.org --- Just for fun I tested a change to drivers/media/Makefile: -obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ spi/ test-drivers/ -obj-$(CONFIG_VIDEO_DEV) += radio/ +obj-y += common/ platform/ pci/ usb/ mmc/ firewire/ spi/ test-drivers/ radio/ but that leaves a slew of other build errors (undefined symbols). drivers/media/radio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -4,10 +4,10 @@ # menuconfig RADIO_ADAPTERS - bool "Radio Adapters" + tristate "Radio Adapters" depends on VIDEO_DEV depends on MEDIA_RADIO_SUPPORT - default y + default VIDEO_DEV help Say Y here to enable selecting AM/FM radio adapters.