diff mbox series

[7/8] spi: s3c24xx: Only have compile time references to FIQ when building it

Message ID 20230221-spi-arch-deps-v1-7-83d1566474cf@kernel.org
State New
Headers show
Series spi: Build coverage cleanups and improvements | expand

Commit Message

Mark Brown Feb. 23, 2023, 5:20 p.m. UTC
There is a config option which allows the FIQ code in the s3c24xx driver
to be disabled but it does not cover the inclusion of the API header or the
variables added to the driver data. Add some ifdefs protecting these so
that we can improve build coverage.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/spi/spi-s3c24xx.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Krzysztof Kozlowski Feb. 24, 2023, 11:06 a.m. UTC | #1
On 23/02/2023 18:20, Mark Brown wrote:
> There is a config option which allows the FIQ code in the s3c24xx driver
> to be disabled but it does not cover the inclusion of the API header or the
> variables added to the driver data. Add some ifdefs protecting these so
> that we can improve build coverage.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  drivers/spi/spi-s3c24xx.c | 4 ++++

Similarly to patch #1 and #8 - the driver is being removed.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index ef25b5e93900..ad13c6004d40 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -21,7 +21,9 @@ 
 #include <linux/spi/s3c24xx-fiq.h>
 #include <linux/module.h>
 
+#ifdef CONFIG_SPI_S3C24XX_FIQ
 #include <asm/fiq.h>
+#endif
 
 #include "spi-s3c24xx-regs.h"
 
@@ -56,10 +58,12 @@  struct s3c24xx_spi {
 	int			 len;
 	int			 count;
 
+#ifdef CONFIG_SPI_S3C24XX_FIQ
 	struct fiq_handler	 fiq_handler;
 	enum spi_fiq_mode	 fiq_mode;
 	unsigned char		 fiq_inuse;
 	unsigned char		 fiq_claimed;
+#endif
 
 	/* data buffers */
 	const unsigned char	*tx;