Messages in this thread Patch in this message | | | From | Maarten ter Huurne <> | Subject | [PATCH 7/7] regulator: act8865: Init at subsys level | Date | Sun, 28 Feb 2016 16:53:29 +0100 |
| |
Since the defined regulators are used in other drivers, we can avoid deferred probing by registering this driver sooner.
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> --- drivers/regulator/act8865-regulator.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index 48608e2..6a0d34f 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -686,7 +686,17 @@ static struct i2c_driver act8865_pmic_driver = { .id_table = act8865_ids, }; -module_i2c_driver(act8865_pmic_driver); +static int __init act8865_pmic_driver_init(void) +{ + return i2c_add_driver(&act8865_pmic_driver); +} +subsys_initcall(act8865_pmic_driver_init); + +static void __exit act8865_pmic_driver_exit(void) +{ + i2c_del_driver(&act8865_pmic_driver); +} +module_exit(act8865_pmic_driver_exit); MODULE_DESCRIPTION("active-semi act88xx voltage regulator driver"); MODULE_AUTHOR("Wenyou Yang <wenyou.yang@atmel.com>"); -- 2.6.2
| |