linux-stable/drivers/media
Arnd Bergmann ccdfcb9119 media: ipu3-cio2: allow ipu_bridge to be a module again
commit 2545a2c02b upstream.

This code was previously part of the VIDEO_IPU3_CIO2 driver, which could
be built-in or a loadable module, but after the move it turned into a
builtin-only driver. This fails to link when the I2C subsystem is a
module:

x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_unregister_sensors':
ipu-bridge.c:(.text+0x50): undefined reference to `i2c_unregister_device'
x86_64-linux-ld: drivers/media/pci/intel/ipu-bridge.o: in function `ipu_bridge_init':
ipu-bridge.c:(.text+0x9c9): undefined reference to `i2c_acpi_new_device_by_fwnode'

In general, drivers should not have to be built-in, so change the option
to a tristate with the corresponding dependency. This in turn opens a
new problem with the dependency, as the IPU bridge can be a loadable module
while the ipu3 driver itself is built-in, producing a new link failure:

86_64-linux-ld: drivers/media/pci/intel/ipu3/ipu3-cio2.o: in function `cio2_pci_probe':
ipu3-cio2.c:(.text+0x197e): undefined reference to `ipu_bridge_init'

In order to fix this, restore the old Kconfig option that controlled
the ipu bridge driver before it was split out, but make it select a
hidden symbol that now corresponds to the bridge driver.

When other drivers get added that share ipu-bridge, this should cover
all corner cases, and allow any combination of them to be built-in
or modular.

Link: https://lore.kernel.org/linux-media/20230727122331.2421453-1-arnd@kernel.org

Fixes: 881ca25978 ("media: ipu3-cio2: rename cio2 bridge to ipu bridge and move out of ipu3")'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:48:44 +02:00
..
cec media: cec: core: add adap_unconfigured() callback 2023-09-13 09:48:30 +02:00
common media: common: saa7146: Avoid a leak in vmalloc_to_sg() 2023-07-19 16:36:28 +02:00
dvb-core Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" 2023-06-14 23:16:29 +01:00
dvb-frontends media: dvb: symbol fixup for dvb_attach() 2023-09-13 09:48:40 +02:00
firewire
i2c media: i2c: Add a camera sensor top level menu 2023-09-13 09:48:38 +02:00
mc media: mc-device: remove unnecessary __must_check 2023-04-11 18:54:01 +02:00
mmc
pci media: ipu3-cio2: allow ipu_bridge to be a module again 2023-09-13 09:48:44 +02:00
platform media: nxp: Fix wrong return pointer check in mxc_isi_crossbar_init() 2023-09-13 09:48:40 +02:00
radio USB / Thunderbolt changes for 6.4-rc1 2023-04-27 11:42:11 -07:00
rc Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
spi
test-drivers media: Zero-initialize all structures passed to subdev pad operations 2023-04-12 09:46:06 +02:00
tuners media: dvb: symbol fixup for dvb_attach() 2023-09-13 09:48:40 +02:00
usb media: go7007: Remove redundant if statement 2023-09-13 09:48:30 +02:00
v4l2-core media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link() 2023-09-13 09:48:25 +02:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile