linux-stable/drivers/staging
Steven Rostedt e84a3bf7f4 staging: gpib: Fix allyesconfig build failures
My tests run an allyesconfig build and it failed with the following errors:

    LD [M]  samples/kfifo/dma-example.ko
  ld.lld: error: undefined symbol: nec7210_board_reset
  ld.lld: error: undefined symbol: nec7210_read
  ld.lld: error: undefined symbol: nec7210_write

It appears that some modules call the function nec7210_board_reset()
that is defined in nec7210.c.  In an allyesconfig build, these other
modules are built in.  But the file that holds nec7210_board_reset()
has:

  obj-m += nec7210.o

Where that "-m" means it only gets built as a module. With the other
modules built in, they have no access to nec7210_board_reset() and the build
fails.

This isn't the only function. After fixing that one, I hit another:

  ld.lld: error: undefined symbol: push_gpib_event
  ld.lld: error: undefined symbol: gpib_match_device_path

Where push_gpib_event() was also used outside of the file it was defined
in, and that file too only was built as a module.

Since the directory that nec7210.c is only traversed when
CONFIG_GPIB_NEC7210 is set, and the directory with gpib_common.c is only
traversed when CONFIG_GPIB_COMMON is set, use those configs as the
option to build those modules.  When it is an allyesconfig, then they
will both be built in and their functions will be available to the other
modules that are also built in.

Fixes: 3ba84ac69b ("staging: gpib: Add nec7210 GPIB chip driver")
Fixes: 9dde4559e9 ("staging: gpib: Add GPIB common core driver")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-21 11:30:13 -08:00
..
axis-fifo staging: Switch back to struct platform_driver::remove() 2024-10-09 11:54:53 +02:00
fbtft fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE 2024-12-17 18:06:10 +01:00
gpib staging: gpib: Fix allyesconfig build failures 2024-12-21 11:30:13 -08:00
greybus staging: greybus: uart: Fix atomicity violation in get_serial_info() 2024-11-10 08:02:37 +01:00
iio module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
media module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
most staging: most: Remove TODO contact information 2024-11-10 08:03:31 +01:00
nvec staging: Switch back to struct platform_driver::remove() 2024-10-09 11:54:53 +02:00
octeon staging: Switch back to struct platform_driver::remove() 2024-10-09 11:54:53 +02:00
rtl8723bs staging: rtl8723bs: Remove TODO contact information 2024-11-10 08:03:30 +01:00
sm750fb staging: sm750fb: Remove TODO contact information 2024-11-10 08:03:30 +01:00
vc04_services Staging driver changes for 6.13-rc1 2024-11-29 11:36:13 -08:00
vme_user staging: vme_user: vme_bridge.h: Name function pointer arguments 2024-11-04 00:51:10 +01:00
Kconfig staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00
Makefile staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00