aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-tegra20-slink.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-05-23 06:20:40 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-23 10:09:55 -0400
commit24b5a82cf5709a4bc577f42fdaa61b23a7f58f08 (patch)
tree39c17c904a2ac67c8b76b9edccf1da00f3620998 /drivers/spi/spi-tegra20-slink.c
parentc7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (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-tegra20-slink.c')
-rw-r--r--drivers/spi/spi-tegra20-slink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
index 3faf88d003de..80490cc11ce5 100644
--- a/drivers/spi/spi-tegra20-slink.c
+++ b/drivers/spi/spi-tegra20-slink.c
@@ -1089,7 +1089,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
1089 master->num_chipselect = MAX_CHIP_SELECT; 1089 master->num_chipselect = MAX_CHIP_SELECT;
1090 master->bus_num = -1; 1090 master->bus_num = -1;
1091 1091
1092 dev_set_drvdata(&pdev->dev, master); 1092 platform_set_drvdata(pdev, master);
1093 tspi = spi_master_get_devdata(master); 1093 tspi = spi_master_get_devdata(master);
1094 tspi->master = master; 1094 tspi->master = master;
1095 tspi->dev = &pdev->dev; 1095 tspi->dev = &pdev->dev;
@@ -1193,7 +1193,7 @@ exit_free_master:
1193 1193
1194static int tegra_slink_remove(struct platform_device *pdev) 1194static int tegra_slink_remove(struct platform_device *pdev)
1195{ 1195{
1196 struct spi_master *master = dev_get_drvdata(&pdev->dev); 1196 struct spi_master *master = platform_get_drvdata(pdev);
1197 struct tegra_slink_data *tspi = spi_master_get_devdata(master); 1197 struct tegra_slink_data *tspi = spi_master_get_devdata(master);
1198 1198
1199 free_irq(tspi->irq, tspi); 1199 free_irq(tspi->irq, tspi);