Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1345330
| From | Maarten ter Huurne <maarten@treewalker.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/7] regulator: act8865: Init at subsys level |
| Date | 2016-02-28 17:00 +0100 |
| Message-ID | <r7bVg-4Ib-9@gated-at.bofh.it> (permalink) |
| References | <r7bVf-4Ib-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 7/7] regulator: act8865: Init at subsys level Maarten ter Huurne <maarten@treewalker.org> - 2016-02-28 17:00 +0100 Re: [PATCH 7/7] regulator: act8865: Init at subsys level Mark Brown <broonie@kernel.org> - 2016-02-29 12:40 +0100
csiph-web