Hi Florian,
On Thu, May 30, 2013 at 03:51:54PM +0200, Florian Vaussard wrote:For now, the call to twl4030-power is hard-wired inside twl-core.Looks good, I only have one comment:
To ease the future transition to DT, make twl4030-power as a
separate module, like what is already done for twl4030-audio
and others.
Signed-off-by: Florian Vaussard <florian.vaussard@xxxxxxx>
---
drivers/mfd/twl-core.c | 12 ++++++---
drivers/mfd/twl4030-power.c | 54 +++++++++++++++++++++++++++++++++++--------
include/linux/i2c/twl.h | 1 -
3 files changed, 52 insertions(+), 15 deletions(-)
+static struct platform_driver twl4030_power_driver = {Please use module_platform_driver() here.
+ .driver = {
+ .name = "twl4030_power",
+ .owner = THIS_MODULE,
+ },
+ .probe = twl4030_power_probe,
+ .remove = twl4030_power_remove,
+};
+
+static int __init twl4030_power_init(void)
+{
+ return platform_driver_register(&twl4030_power_driver);
}
+subsys_initcall(twl4030_power_init);
+
+static void __exit twl4030_power_exit(void)
+{
+ platform_driver_unregister(&twl4030_power_driver);
+}
+module_exit(twl4030_power_exit);