* [PATCH] media: pvrusb2: fix DVB_CORE dependency
@ 2023-01-17 17:10 Arnd Bergmann
2023-01-18 15:39 ` Mike Isely
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-01-17 17:10 UTC (permalink / raw)
To: Mike Isely, Mauro Carvalho Chehab, Lecopzer Chen, Hans Verkuil
Cc: Arnd Bergmann, Łukasz Stelmach, Laurent Pinchart,
Jacopo Mondi, Andrzej Pietrasiewicz, linux-media, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Now that DVB_CORE can be a loadable module, pvrusb2 can run into
a link error:
ld.lld: error: undefined symbol: dvb_module_probe
>>> referenced by pvrusb2-devattr.c
>>> drivers/media/usb/pvrusb2/pvrusb2-devattr.o:(pvr2_lgdt3306a_attach) in archive vmlinux.a
ld.lld: error: undefined symbol: dvb_module_release
>>> referenced by pvrusb2-devattr.c
>>> drivers/media/usb/pvrusb2/pvrusb2-devattr.o:(pvr2_dual_fe_attach) in archive vmlinux.a
Refine the Kconfig dependencies to avoid this case.
Fixes: 7655c342dbc4 ("media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/usb/pvrusb2/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/usb/pvrusb2/Kconfig b/drivers/media/usb/pvrusb2/Kconfig
index f2b64e49c5a2..e02a25d2d029 100644
--- a/drivers/media/usb/pvrusb2/Kconfig
+++ b/drivers/media/usb/pvrusb2/Kconfig
@@ -37,6 +37,7 @@ config VIDEO_PVRUSB2_DVB
bool "pvrusb2 ATSC/DVB support"
default y
depends on VIDEO_PVRUSB2 && DVB_CORE
+ depends on VIDEO_PVRUSB2=m || DVB_CORE=y
select DVB_LGDT330X if MEDIA_SUBDRV_AUTOSELECT
select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT
select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] media: pvrusb2: fix DVB_CORE dependency
2023-01-17 17:10 [PATCH] media: pvrusb2: fix DVB_CORE dependency Arnd Bergmann
@ 2023-01-18 15:39 ` Mike Isely
2023-01-18 15:57 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Mike Isely @ 2023-01-18 15:39 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mauro Carvalho Chehab, Lecopzer Chen, Hans Verkuil,
Arnd Bergmann, Łukasz Stelmach, Laurent Pinchart,
Jacopo Mondi, Andrzej Pietrasiewicz, linux-media,
Linux Kernel Mailing List, Mike Isely at pobox
That doesn't seem right. The pvrusb2 module should reference that
symbol like any other. There is no special treatment of it within
pvrusb2 - so why is that requiring special treatment here?
Is it possible that dvb_module_probe and dvb_module_release are not
exported? (Or that there are two corresponding different exported
symbol names that pvrusb2 should be using instead?)
-Mike
On Tue, 17 Jan 2023, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Now that DVB_CORE can be a loadable module, pvrusb2 can run into
> a link error:
>
> ld.lld: error: undefined symbol: dvb_module_probe
> >>> referenced by pvrusb2-devattr.c
> >>> drivers/media/usb/pvrusb2/pvrusb2-devattr.o:(pvr2_lgdt3306a_attach) in archive vmlinux.a
> ld.lld: error: undefined symbol: dvb_module_release
> >>> referenced by pvrusb2-devattr.c
> >>> drivers/media/usb/pvrusb2/pvrusb2-devattr.o:(pvr2_dual_fe_attach) in archive vmlinux.a
>
> Refine the Kconfig dependencies to avoid this case.
>
> Fixes: 7655c342dbc4 ("media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/media/usb/pvrusb2/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/usb/pvrusb2/Kconfig b/drivers/media/usb/pvrusb2/Kconfig
> index f2b64e49c5a2..e02a25d2d029 100644
> --- a/drivers/media/usb/pvrusb2/Kconfig
> +++ b/drivers/media/usb/pvrusb2/Kconfig
> @@ -37,6 +37,7 @@ config VIDEO_PVRUSB2_DVB
> bool "pvrusb2 ATSC/DVB support"
> default y
> depends on VIDEO_PVRUSB2 && DVB_CORE
> + depends on VIDEO_PVRUSB2=m || DVB_CORE=y
> select DVB_LGDT330X if MEDIA_SUBDRV_AUTOSELECT
> select DVB_S5H1409 if MEDIA_SUBDRV_AUTOSELECT
> select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: pvrusb2: fix DVB_CORE dependency
2023-01-18 15:39 ` Mike Isely
@ 2023-01-18 15:57 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-01-18 15:57 UTC (permalink / raw)
To: Mike Isely at pobox, Arnd Bergmann
Cc: Mauro Carvalho Chehab, Lecopzer Chen, Hans Verkuil,
Łukasz Stelmach, laurent.pinchart, Jacopo Mondi,
Andrzej Pietrasiewicz, linux-media, Linux Kernel Mailing List
On Wed, Jan 18, 2023, at 16:39, Mike Isely wrote:
> That doesn't seem right. The pvrusb2 module should reference that
> symbol like any other. There is no special treatment of it within
> pvrusb2 - so why is that requiring special treatment here?
The problem is that VIDEO_PVRUSB2_DVB is a 'bool' symbol, not
a 'tristate', so the existing 'depends on DVB_CORE' is not sufficient.
Another way to do this would be to prevent VIDEO_PVRUSB2 from
being built-in when DVB_CORE is a module:
config VIDEO_PVRUSB2
tristate "Hauppauge WinTV-PVR USB2 support"
depends on VIDEO_DEV && I2C
+ depends on DVB_CORE || !DVB_CORE
select VIDEO_TUNER
select VIDEO_TVEEPROM
select VIDEO_CX2341X
but that doesn't feel right for users that don't care about DVB
support.
> Is it possible that dvb_module_probe and dvb_module_release are not
> exported? (Or that there are two corresponding different exported
> symbol names that pvrusb2 should be using instead?)
No.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-18 16:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-17 17:10 [PATCH] media: pvrusb2: fix DVB_CORE dependency Arnd Bergmann
2023-01-18 15:39 ` Mike Isely
2023-01-18 15:57 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.