Thread (10 messages) flat view 10 messages, 4 authors, 2011-02-16

Re: [PATCH v9] spi: New driver for Altera SPI

From: Thomas Chou <hidden>
Date: 2011-02-15 07:01:54
Also in: linux-spi, lkml

Dear Ryan,

On 02/14/2011 10:20 AM, Ryan Mallon wrote:
On 02/14/2011 03:10 PM, Thomas Chou wrote:
quoted
This patch adds a new SPI driver to support the Altera SOPC Builder
SPI component. It uses the bitbanging library.

Signed-off-by: Thomas Chou<redacted>
---
quoted
+struct altera_spi {
+	/* bitbang has to be first */
+	struct spi_bitbang bitbang;
Is this still true? I had a quick look and can't see anything which
relies on spi_bitbang being the first entry. Things like this should be
using container_of so that position in the struct is irrelevant.

~Ryan
Yes, sadly true. This is due to the implementation of the bitbanging 
library, spi_bitbang.c, which assumes the struct spi_bitbang is the 
first of drvdata. Though it could be changed in the future (beyond this 
little driver), every bitbanging library user has to follow this for now.

Best regards,
Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help