[PATCH 2/3] regulator: pfuze: Use device_i2c_driver() macro
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 29 04:19:08 EDT 2020
Shorten driver registration by using the suitable macro.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/regulator/pfuze.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/regulator/pfuze.c b/drivers/regulator/pfuze.c
index 91aaec0e7e..1983ec91f6 100644
--- a/drivers/regulator/pfuze.c
+++ b/drivers/regulator/pfuze.c
@@ -206,15 +206,4 @@ static struct driver_d pfuze_i2c_driver = {
.of_compatible = DRV_OF_COMPAT(pfuze_dt_ids),
};
-static int __init pfuze_init(void)
-{
- int ret;
-
- ret = i2c_driver_register(&pfuze_i2c_driver);
- if (ret)
- return ret;
-
- return 0;
-
-}
-late_initcall(pfuze_init);
+device_i2c_driver(pfuze_i2c_driver);
--
2.28.0
More information about the barebox
mailing list