This allows drivers that support multiple buses to keep the code for registering their SPI variant even if SPI is disabled. Signed-off-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx> --- Changelog: v2: - new patch --- include/spi/spi.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/spi/spi.h b/include/spi/spi.h index c5efca1cc31c..bca996d8d8f9 100644 --- a/include/spi/spi.h +++ b/include/spi/spi.h @@ -515,9 +515,14 @@ static inline int spi_driver_register(struct driver_d *drv) return register_driver(drv); } +#ifdef CONFIG_SPI #define coredevice_spi_driver(drv) \ register_driver_macro(coredevice,spi,drv) #define device_spi_driver(drv) \ register_driver_macro(device,spi,drv) +#else +#define coredevice_spi_driver(drv) +#define device_spi_driver(drv) +#endif #endif /* __INCLUDE_SPI_H */ -- 2.30.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox