diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 06:20:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-23 10:09:55 -0400 |
commit | 24b5a82cf5709a4bc577f42fdaa61b23a7f58f08 (patch) | |
tree | 39c17c904a2ac67c8b76b9edccf1da00f3620998 /drivers/spi/spi-mpc52xx.c | |
parent | c7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff) |
spi: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-mpc52xx.c')
-rw-r--r-- | drivers/spi/spi-mpc52xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 29f77056eedc..7c675fe83101 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c | |||
@@ -438,7 +438,7 @@ static int mpc52xx_spi_probe(struct platform_device *op) | |||
438 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; | 438 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; |
439 | master->dev.of_node = op->dev.of_node; | 439 | master->dev.of_node = op->dev.of_node; |
440 | 440 | ||
441 | dev_set_drvdata(&op->dev, master); | 441 | platform_set_drvdata(op, master); |
442 | 442 | ||
443 | ms = spi_master_get_devdata(master); | 443 | ms = spi_master_get_devdata(master); |
444 | ms->master = master; | 444 | ms->master = master; |
@@ -529,7 +529,7 @@ static int mpc52xx_spi_probe(struct platform_device *op) | |||
529 | 529 | ||
530 | static int mpc52xx_spi_remove(struct platform_device *op) | 530 | static int mpc52xx_spi_remove(struct platform_device *op) |
531 | { | 531 | { |
532 | struct spi_master *master = spi_master_get(dev_get_drvdata(&op->dev)); | 532 | struct spi_master *master = spi_master_get(platform_get_drvdata(op)); |
533 | struct mpc52xx_spi *ms = spi_master_get_devdata(master); | 533 | struct mpc52xx_spi *ms = spi_master_get_devdata(master); |
534 | int i; | 534 | int i; |
535 | 535 | ||