[PATCH 2/3] regulator: pfuze: Use device_i2c_driver() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shorten driver registration by using the suitable macro.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux