[PATCH 1/3] i2c: add coredevice_i2c_driver() macro

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

 



Some i2c device want to be coredevices. Add a macro to avoid
boilerplate code.

Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
---
 include/i2c/i2c.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/i2c/i2c.h b/include/i2c/i2c.h
index a694e4ab2ff1..cb65c43e4110 100644
--- a/include/i2c/i2c.h
+++ b/include/i2c/i2c.h
@@ -318,6 +318,8 @@ static inline int i2c_driver_register(struct driver_d *drv)
 	return register_driver(drv);
 }
 
+#define coredevice_i2c_driver(drv) \
+	register_driver_macro(coredevice, i2c, drv)
 #define device_i2c_driver(drv) \
 	register_driver_macro(device, i2c, drv)
 
-- 
2.20.1


_______________________________________________
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