aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2020-07-25 09:44:14 +0800
committerMark Brown <[email protected]>2020-07-27 14:34:22 +0100
commit3bda44ffd93bf91fb3326336acf7ff163b1ce97d (patch)
tree7fc5f89c9a9c9f0efe5793864eee10279a13adaa
parent9177514ce34902b3adb2abd490b6ad05d1cfcb43 (diff)
regulator: pca9450: Convert to use module_i2c_driver
Use module_i2c_driver to simplify driver init boilerplate. Signed-off-by: Axel Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/regulator/pca9450-regulator.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 02250459aa90..eb5822bf53e0 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -826,17 +826,7 @@ static struct i2c_driver pca9450_i2c_driver = {
.probe = pca9450_i2c_probe,
};
-static int __init pca9450_i2c_init(void)
-{
- return i2c_add_driver(&pca9450_i2c_driver);
-}
-module_init(pca9450_i2c_init);
-
-static void __exit pca9450_i2c_exit(void)
-{
- i2c_del_driver(&pca9450_i2c_driver);
-}
-module_exit(pca9450_i2c_exit);
+module_i2c_driver(pca9450_i2c_driver);
MODULE_AUTHOR("Robin Gong <[email protected]>");
MODULE_DESCRIPTION("NXP PCA9450 Power Management IC driver");