Skip to contentSkip to conversation

mfd: tps68470: drop unused MODULE_DEVICE_TABLE

PATCH Applied Paul Gortmaker 2 participants 2 messages Feb 6, 2019 – Feb 7, 2019 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: tps68470: drop unused MODULE_DEVICE_TABLE

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_TPS68470
drivers/mfd/Kconfig: bool "TI TPS68470 Power Management / LED chips"

...meaning that it currently is not being built as a module by anyone.

Hence we remove the MODULE_DEVICE_TABLE since it is a no-op for non-modular code.

There is no removal of <linux/module.h> here because there isn't one. Instead, it is relying on including that implicitly from an ACPI header.

In cleaning up the ACPI instance of module.h (which also isn't strictly needed), then this mfd driver breaks when MODULE_DEVICE_TABLE becomes undefined here.

The easiest dependency solution is to simply defer the ACPI cleanup until this change is present in mainline.

drivers/mfd/tps68470.c +0 -1
index a5981a79b29a..4a4df4ffd18c 100644
@@ -86,7 +86,6 @@ static const struct acpi_device_id tps68470_acpi_ids[] = {
 	{"INT3472"},
 	{},
 };
-MODULE_DEVICE_TABLE(acpi, tps68470_acpi_ids);
 
 static struct i2c_driver tps68470_driver = {
 	.driver = {
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 17 lines · Paul Gortmaker

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config MFD_TPS68470
drivers/mfd/Kconfig: bool "TI TPS68470 Power Management / LED chips"

...meaning that it currently is not being built as a module by anyone.

Hence we remove the MODULE_DEVICE_TABLE since it is a no-op for non-modular code.

There is no removal of <linux/module.h> here because there isn't one. Instead, it is relying on including that implicitly from an ACPI header.

In cleaning up the ACPI instance of module.h (which also isn't strictly needed), then this mfd driver breaks when MODULE_DEVICE_TABLE becomes undefined here.

Quoted 5 lines

The easiest dependency solution is to simply defer the ACPI cleanup until this change is present in mainline.

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog