Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Arnd Bergmann and committed by
Andi Shyti
f44bff19 83ef106f

+8 -4
+2 -4
drivers/i2c/busses/Makefile
··· 90 90 obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o 91 91 obj-$(CONFIG_I2C_OMAP) += i2c-omap.o 92 92 obj-$(CONFIG_I2C_OWL) += i2c-owl.o 93 - i2c-pasemi-objs := i2c-pasemi-core.o i2c-pasemi-pci.o 94 - obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi.o 95 - i2c-apple-objs := i2c-pasemi-core.o i2c-pasemi-platform.o 96 - obj-$(CONFIG_I2C_APPLE) += i2c-apple.o 93 + obj-$(CONFIG_I2C_PASEMI) += i2c-pasemi-core.o i2c-pasemi-pci.o 94 + obj-$(CONFIG_I2C_APPLE) += i2c-pasemi-core.o i2c-pasemi-platform.o 97 95 obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o 98 96 obj-$(CONFIG_I2C_PNX) += i2c-pnx.o 99 97 obj-$(CONFIG_I2C_PXA) += i2c-pxa.o
+6
drivers/i2c/busses/i2c-pasemi-core.c
··· 369 369 370 370 return 0; 371 371 } 372 + EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe); 372 373 373 374 irqreturn_t pasemi_irq_handler(int irq, void *dev_id) 374 375 { ··· 379 378 complete(&smbus->irq_completion); 380 379 return IRQ_HANDLED; 381 380 } 381 + EXPORT_SYMBOL_GPL(pasemi_irq_handler); 382 + 383 + MODULE_LICENSE("GPL"); 384 + MODULE_AUTHOR("Olof Johansson <olof@lixom.net>"); 385 + MODULE_DESCRIPTION("PA Semi PWRficient SMBus driver");