Skip to contentSkip to conversation

spi: fix spi_s3c24xx_gpio device handle lookup

PATCH In review David Brownell 2 participants 3 messages Nov 22, 2008 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 spi: fix spi_s3c24xx_gpio device handle lookup

From: Ben Dooks <[email protected]>

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.

---
 drivers/spi/spi_s3c24xx_gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi_s3c24xx_gpio.c +1 -1
@@ -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=/

A message that is not in the archive (sent off-list or not yet received): 200811221219.01461.david-b-yBeKhBN/[email protected]

#2 lore raw
Quoted 15 lines · On Sat, 22 Nov 2008 12:19:01 -0800 David Brownell…

From: Ben Dooks <[email protected]>

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.

---
 drivers/spi/spi_s3c24xx_gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

drivers/spi/spi_s3c24xx_gpio.c struct s3c2410_spigpio { · line 40

Quoted 8 lines
drivers/spi/spi_s3c24xx_gpio.c +1 -1
@@ -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=/

A message that is not in the archive (sent off-list or not yet received): 20081122131653.859c0d37.akpm-de/[email protected]

#4 lore raw
Quoted 1 line · Andrew Morton

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