i2c: pasemi: split driver into two separate modules
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Feb 2024 11:19:04 +0000 (12:19 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Wed, 14 Feb 2024 21:15:07 +0000 (22:15 +0100)
commitf44bff19268517ee98e80e944cad0f04f1db72e3
treebe574763aea06088d4ab31964fb9ea8bd48b4032
parent83ef106fa732aea8558253641cd98e8a895604d7
i2c: pasemi: split driver into two separate modules

On powerpc, it is possible to compile test both the new apple (arm) and
old pasemi (powerpc) drivers for the i2c hardware at the same time,
which leads to a warning about linking the same object file twice:

scripts/Makefile.build:244: drivers/i2c/busses/Makefile: i2c-pasemi-core.o is added to multiple modules: i2c-apple i2c-pasemi

Rework the driver to have an explicit helper module, letting Kbuild
take care of whether this should be built-in or a loadable driver.

Fixes: 9bc5f4f660ff ("i2c: pasemi: Split pci driver to its own file")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-pasemi-core.c