214-spidev_h_portability.patch 1.0 KB

1234567891011121314151617181920212223242526272829
  1. From be9be95ff10e16a5b4ad36f903978d0cc5747024 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <[email protected]>
  3. Date: Fri, 7 Jul 2017 17:04:08 +0200
  4. Subject: kernel: fix linux/spi/spidev.h portability issues with musl
  5. Felix will try to get this define included into musl
  6. lede-commit: 795e7cf60de19e7a076a46874fab7bb88b43bbff
  7. Signed-off-by: Felix Fietkau <[email protected]>
  8. ---
  9. include/uapi/linux/spi/spidev.h | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
  12. index dd5f21e75805..e5e8fea8b068 100644
  13. --- a/include/uapi/linux/spi/spidev.h
  14. +++ b/include/uapi/linux/spi/spidev.h
  15. @@ -111,7 +111,7 @@ struct spi_ioc_transfer {
  16. /* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
  17. #define SPI_MSGSIZE(N) \
  18. - ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
  19. + ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << 13)) \
  20. ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
  21. #define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
  22. --
  23. 2.11.0