Re: [PATCH] spi: coldfire-qspi: Fix bits per word setting when t->bits_per_word is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/26/2014 06:05 PM, Axel Lin wrote:
> This ensures to use spi_device's bits_per_word setting when t->bits_per_word is
> not set. This looks like a bug introduced by commit 24778be20f8
> "spi: convert drivers to use bits_per_word_mask".

I thought the SPI core already contained this kind of logic, so that
drivers could rely on t->bits_per_word always being set up? Yes, this:

> static int __spi_validate(struct spi_device *spi, struct spi_message *message)
...
>         /**
>          * Set transfer bits_per_word and max speed as spi device default if
>          * it is not set for this transfer.
>          * Set transfer tx_nbits and rx_nbits as single transfer default
>          * (SPI_NBITS_SINGLE) if it is not set for this transfer.
>          */
>         list_for_each_entry(xfer, &message->transfers, transfer_list) {
>                 message->frame_length += xfer->len;
>                 if (!xfer->bits_per_word)
>                         xfer->bits_per_word = spi->bits_per_word;

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux