Loading drivers/spi/spi-dw-core.c +1 −1 Original line number Diff line number Diff line Loading @@ -366,7 +366,7 @@ static void dw_spi_irq_setup(struct dw_spi *dws) * will be adjusted at the final stage of the IRQ-based SPI transfer * execution so not to lose the leftover of the incoming data. */ level = min_t(u16, dws->fifo_len / 2, dws->tx_len); level = min_t(unsigned int, dws->fifo_len / 2, dws->tx_len); dw_writel(dws, DW_SPI_TXFTLR, level); dw_writel(dws, DW_SPI_RXFTLR, level - 1); Loading drivers/spi/spidev.c +16 −5 Original line number Diff line number Diff line Loading @@ -89,10 +89,22 @@ MODULE_PARM_DESC(bufsiz, "data bytes in biggest supported SPI message"); /*-------------------------------------------------------------------------*/ static ssize_t spidev_sync_unlocked(struct spi_device *spi, struct spi_message *message) { ssize_t status; status = spi_sync(spi, message); if (status == 0) status = message->actual_length; return status; } static ssize_t spidev_sync(struct spidev_data *spidev, struct spi_message *message) { int status; ssize_t status; struct spi_device *spi; mutex_lock(&spidev->spi_lock); Loading @@ -101,10 +113,9 @@ spidev_sync(struct spidev_data *spidev, struct spi_message *message) if (spi == NULL) status = -ESHUTDOWN; else status = spi_sync(spi, message); status = spidev_sync_unlocked(spi, message); if (status == 0) status = message->actual_length; mutex_unlock(&spidev->spi_lock); mutex_unlock(&spidev->spi_lock); return status; Loading Loading @@ -294,7 +305,7 @@ static int spidev_message(struct spidev_data *spidev, spi_message_add_tail(k_tmp, &msg); } status = spidev_sync(spidev, &msg); status = spidev_sync_unlocked(spidev->spi, &msg); if (status < 0) goto done; Loading Loading
drivers/spi/spi-dw-core.c +1 −1 Original line number Diff line number Diff line Loading @@ -366,7 +366,7 @@ static void dw_spi_irq_setup(struct dw_spi *dws) * will be adjusted at the final stage of the IRQ-based SPI transfer * execution so not to lose the leftover of the incoming data. */ level = min_t(u16, dws->fifo_len / 2, dws->tx_len); level = min_t(unsigned int, dws->fifo_len / 2, dws->tx_len); dw_writel(dws, DW_SPI_TXFTLR, level); dw_writel(dws, DW_SPI_RXFTLR, level - 1); Loading
drivers/spi/spidev.c +16 −5 Original line number Diff line number Diff line Loading @@ -89,10 +89,22 @@ MODULE_PARM_DESC(bufsiz, "data bytes in biggest supported SPI message"); /*-------------------------------------------------------------------------*/ static ssize_t spidev_sync_unlocked(struct spi_device *spi, struct spi_message *message) { ssize_t status; status = spi_sync(spi, message); if (status == 0) status = message->actual_length; return status; } static ssize_t spidev_sync(struct spidev_data *spidev, struct spi_message *message) { int status; ssize_t status; struct spi_device *spi; mutex_lock(&spidev->spi_lock); Loading @@ -101,10 +113,9 @@ spidev_sync(struct spidev_data *spidev, struct spi_message *message) if (spi == NULL) status = -ESHUTDOWN; else status = spi_sync(spi, message); status = spidev_sync_unlocked(spi, message); if (status == 0) status = message->actual_length; mutex_unlock(&spidev->spi_lock); mutex_unlock(&spidev->spi_lock); return status; Loading Loading @@ -294,7 +305,7 @@ static int spidev_message(struct spidev_data *spidev, spi_message_add_tail(k_tmp, &msg); } status = spidev_sync(spidev, &msg); status = spidev_sync_unlocked(spidev->spi, &msg); if (status < 0) goto done; Loading