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

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

 



On 5/11/20 6:50 PM, Lucas Stach wrote:
> Some i2c device want to be coredevices. Add a macro to avoid
> boilerplate code.

For all three patches:
Tested-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>

> 
> 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)
>  
> 

-- 
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@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