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

mfd: twl-core: Make it explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/mfd/Kconfig:config TWL4030_CORE
drivers/mfd/Kconfig: bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 Support"

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

Lets remove what modular code that we can, so that when reading the
driver there is less doubt that it is builtin-only. Note that we can't
remove the twl_remove() itself ; it is still used by the probe unwind
routine. So we leave it linked into the .remove as well, even though
it will most likely never be called via that path from an unbind.

Since module_i2c_driver() uses the same init level priority as
builtin_i2c_driver() the init ordering remains unchanged with
this commit.

Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Paul Gortmaker and committed by
Lee Jones
7a243b63 391cd33a

+1 -8
+1 -8
drivers/mfd/twl-core.c
··· 30 30 31 31 #include <linux/init.h> 32 32 #include <linux/mutex.h> 33 - #include <linux/module.h> 34 33 #include <linux/platform_device.h> 35 34 #include <linux/regmap.h> 36 35 #include <linux/clk.h> ··· 1257 1258 { "twl6032", TWL6030_CLASS | TWL6032_SUBCLASS }, /* "Phoenix lite" */ 1258 1259 { /* end of list */ }, 1259 1260 }; 1260 - MODULE_DEVICE_TABLE(i2c, twl_ids); 1261 1261 1262 1262 /* One Client Driver , 4 Clients */ 1263 1263 static struct i2c_driver twl_driver = { ··· 1265 1267 .probe = twl_probe, 1266 1268 .remove = twl_remove, 1267 1269 }; 1268 - 1269 - module_i2c_driver(twl_driver); 1270 - 1271 - MODULE_AUTHOR("Texas Instruments, Inc."); 1272 - MODULE_DESCRIPTION("I2C Core interface for TWL"); 1273 - MODULE_LICENSE("GPL"); 1270 + builtin_i2c_driver(twl_driver);