From: Andrew Morton Subject: Re: [patch 2.6.8-rc6 1/3] spi: fix spi_s3c24xx_gpio device handle lookup Date: Sat, 22 Nov 2008 13:16:53 -0800 Message-ID: <20081122131653.859c0d37.akpm@linux-foundation.org> References: <200811221219.01461.david-b@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Ben Dooks To: David Brownell Return-path: In-Reply-To: <200811221219.01461.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Sat, 22 Nov 2008 12:19:01 -0800 David Brownell wrote: > From: Ben Dooks > > The spidev_to_sg() call in spi_s3c24xx_gpio.c was using the > wrong method to convert the spi device into the private data > for the driver. Fix this by using spi_master_get_devdata. > > Signed-off-by: Ben Dooks > Signed-off-by: David Brownell > --- > drivers/spi/spi_s3c24xx_gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/spi/spi_s3c24xx_gpio.c > +++ b/drivers/spi/spi_s3c24xx_gpio.c > @@ -34,7 +34,7 @@ struct s3c2410_spigpio { > > static inline struct s3c2410_spigpio *spidev_to_sg(struct spi_device *spi) > { > - return spi->controller_data; > + return spi_master_get_devdata(spi->master); > } > > static inline void setsck(struct spi_device *dev, int on) hm. Why doesn't this oops all over the place? Is that info presently duplicated? ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/