On Mon, May 11, 2020 at 06:50:17PM +0200, Lucas Stach wrote:
> Some i2c device want to be coredevices. Add a macro to avoid
> boilerplate code.
> 
> Signed-off-by: Lucas Stach <l.st...@pengutronix.de>
> ---
>  include/i2c/i2c.h | 2 ++
>  1 file changed, 2 insertions(+)

This reminds me of your deep-probe series, I should maybe nack this
patch ;)

Sascha

> 
> 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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

Reply via email to