Skip to content

Commit f44bff1

Browse files
arndbAndi Shyti
authored andcommitted
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: 9bc5f4f ("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>
1 parent 83ef106 commit f44bff1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

drivers/i2c/busses/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ obj-$(CONFIG_I2C_NPCM) += i2c-npcm7xx.o
9090
obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o
9191
obj-$(CONFIG_I2C_OMAP) += i2c-omap.o
9292
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
9795
obj-$(CONFIG_I2C_PCA_PLATFORM) += i2c-pca-platform.o
9896
obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
9997
obj-$(CONFIG_I2C_PXA) += i2c-pxa.o

drivers/i2c/busses/i2c-pasemi-core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ int pasemi_i2c_common_probe(struct pasemi_smbus *smbus)
369369

370370
return 0;
371371
}
372+
EXPORT_SYMBOL_GPL(pasemi_i2c_common_probe);
372373

373374
irqreturn_t pasemi_irq_handler(int irq, void *dev_id)
374375
{
@@ -378,3 +379,8 @@ irqreturn_t pasemi_irq_handler(int irq, void *dev_id)
378379
complete(&smbus->irq_completion);
379380
return IRQ_HANDLED;
380381
}
382+
EXPORT_SYMBOL_GPL(pasemi_irq_handler);
383+
384+
MODULE_LICENSE("GPL");
385+
MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
386+
MODULE_DESCRIPTION("PA Semi PWRficient SMBus driver");

0 commit comments

Comments
 (0)