lkml.org 
[lkml]   [2016]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 7/7] regulator: act8865: Init at subsys level
Date
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
\
 
 \ /
  Last update: 2016-02-28 17:41    [W:0.084 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site