]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: pasemi: split driver into two separate modules
authorArnd Bergmann <arnd@arndb.de>
Mon, 12 Feb 2024 11:19:04 +0000 (12:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:34 +0000 (09:51 +0100)
commitb50d5bae9173d0919aacde0e2d0eb7fd36f36cb4
tree357ec7ba1f4d267b7c3fcf0cdfc82e4ef749bfbc
parentc90fdea9cac9eb419fc266e75d625cb60c8f7f6c
i2c: pasemi: split driver into two separate modules

[ Upstream commit f44bff19268517ee98e80e944cad0f04f1db72e3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-pasemi-core.c