On Friday 23 December 2005 6:06 am, Vitaly Wool wrote:
> Hi,
>
> the patch inlined is changing the SPI core and its users to have
> transfers in the SPI message structure as linked list not as an array,
It basically looks OK. I've updated it a bit, and will include an
updated version in any future updates of mine. (Right now I have
to merge your second version with my updated one ... )
So we'll be well on the way to agreeing on a single SPI framework
to evolve and integrate against.
> - req->msg.transfers = req->xfer;
> - req->msg.n_transfer = 6;
> + for (i = 0; i < 6; i++)
> + list_add_tail(&req->xfer[i].link, &req->msg.transfers);
More expensive, but not in a way that will often matter much. That
one's part of one-time init, for example. And the attached code
uses the spi_message_add_tail(transfer, message) you had mentioned.
> + DECLARE_SPI_MESSAGE(m);
The updated code has only an spi_message_init() function.
>
> - for (;;t++) {
> + list_for_each_entry (t, &m->transfers, link) {...}
...
> - tmp = m->n_transfer - 1;
> - tmp = m->transfers[tmp].cs_change;
> + if (t)
> + tmp = t->cs_change;
Bug: "t" is non-null but invalid there. (Fixed.)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]