Skip to content

Commit

Permalink
spi: fix spi_s3c24xx_gpio device handle lookup
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ben Dooks authored and torvalds committed Dec 2, 2008
1 parent 4e253d2 commit e39ea8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi_s3c24xx_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e39ea8a

Please sign in to comment.