linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.8-rc6 1/3] spi: fix spi_s3c24xx_gpio device handle lookup
@ 2008-11-22 20:19 David Brownell
       [not found] ` <200811221219.01461.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: David Brownell @ 2008-11-22 20:19 UTC (permalink / raw)
  To: Andrew Morton
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Ben Dooks

From: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>

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 <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
---
 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)

-------------------------------------------------------------------------
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=/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 2.6.8-rc6 1/3] spi: fix spi_s3c24xx_gpio device handle lookup
       [not found] ` <200811221219.01461.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
@ 2008-11-22 21:16   ` Andrew Morton
       [not found]     ` <20081122131653.859c0d37.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2008-11-22 21:16 UTC (permalink / raw)
  To: David Brownell
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Ben Dooks

On Sat, 22 Nov 2008 12:19:01 -0800 David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:

> From: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> 
> 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 <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> ---
>  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=/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 2.6.8-rc6 1/3] spi: fix spi_s3c24xx_gpio device handle lookup
       [not found]     ` <20081122131653.859c0d37.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
@ 2008-11-22 21:45       ` David Brownell
  0 siblings, 0 replies; 3+ messages in thread
From: David Brownell @ 2008-11-22 21:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Ben Dooks

On Saturday 22 November 2008, Andrew Morton wrote:
> hm.  Why doesn't this oops all over the place? 

I think ... because this driver hasn't been able to
initialize in recent kernels, because of patch #3
being missing.

-------------------------------------------------------------------------
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=/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-22 21:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-22 20:19 [patch 2.6.8-rc6 1/3] spi: fix spi_s3c24xx_gpio device handle lookup David Brownell
     [not found] ` <200811221219.01461.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-22 21:16   ` Andrew Morton
     [not found]     ` <20081122131653.859c0d37.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2008-11-22 21:45       ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).