214-spidev_h_portability.patch 939 B

123456789101112131415161718192021222324
  1. From be9be95ff10e16a5b4ad36f903978d0cc5747024 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <nbd@nbd.name>
  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 <nbd@nbd.name>
  8. ---
  9. include/uapi/linux/spi/spidev.h | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. --- a/include/uapi/linux/spi/spidev.h
  12. +++ b/include/uapi/linux/spi/spidev.h
  13. @@ -113,7 +113,7 @@ struct spi_ioc_transfer {
  14. /* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
  15. #define SPI_MSGSIZE(N) \
  16. - ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
  17. + ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << 13)) \
  18. ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
  19. #define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])