]> 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:24:59 +0000 (09:24 +0100)
commita99ba46e8a20243926bfb0e29bf9e2d4783ce4d2
treed71d062c29b3532be79dcbee4fceb752b018eafa
parent4cc31fa07445879a13750cb061bb8c2654975fcb
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