From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3woQ-0006jl-ON for barebox@lists.infradead.org; Fri, 07 Aug 2020 07:29:11 +0000 From: Ahmad Fatoum Date: Fri, 7 Aug 2020 09:29:05 +0200 Message-Id: <20200807072905.2488-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] spi: add coredevice_spi_driver macro as well To: barebox@lists.infradead.org Cc: Ahmad Fatoum Some drivers would benefit from earlier probing, e.g. because they provide regulators. Add a macro to make registration of such drivers easier. Signed-off-by: Ahmad Fatoum --- include/spi/spi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/spi/spi.h b/include/spi/spi.h index 66e0500d04c0..c5efca1cc31c 100644 --- a/include/spi/spi.h +++ b/include/spi/spi.h @@ -515,6 +515,8 @@ static inline int spi_driver_register(struct driver_d *drv) return register_driver(drv); } +#define coredevice_spi_driver(drv) \ + register_driver_macro(coredevice,spi,drv) #define device_spi_driver(drv) \ register_driver_macro(device,spi,drv) -- 2.28.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox