aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mc13xxx-spi.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-06 02:44:14 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-09 06:18:16 -0400
commita720c3053322231d6fc6c5e7459ea1ea068904c4 (patch)
treef591bdcac9ba00dd7917d828cb579e6e3160115e /drivers/mfd/mc13xxx-spi.c
parent7c478b405837e91f68208b423acd20dad184998c (diff)
mfd: mc13xxx: Use spi_get_drvdata() and spi_set_drvdata()
Use the wrapper functions for getting and setting the driver data using spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we can directly pass a struct spi_device. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/mc13xxx-spi.c')
-rw-r--r--drivers/mfd/mc13xxx-spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index 3032bae20b62..77189daadf1e 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -131,7 +131,7 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
131 if (!mc13xxx) 131 if (!mc13xxx)
132 return -ENOMEM; 132 return -ENOMEM;
133 133
134 dev_set_drvdata(&spi->dev, mc13xxx); 134 spi_set_drvdata(spi, mc13xxx);
135 spi->mode = SPI_MODE_0 | SPI_CS_HIGH; 135 spi->mode = SPI_MODE_0 | SPI_CS_HIGH;
136 136
137 mc13xxx->dev = &spi->dev; 137 mc13xxx->dev = &spi->dev;
@@ -144,7 +144,7 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
144 ret = PTR_ERR(mc13xxx->regmap); 144 ret = PTR_ERR(mc13xxx->regmap);
145 dev_err(mc13xxx->dev, "Failed to initialize register map: %d\n", 145 dev_err(mc13xxx->dev, "Failed to initialize register map: %d\n",
146 ret); 146 ret);
147 dev_set_drvdata(&spi->dev, NULL); 147 spi_set_drvdata(spi, NULL);
148 return ret; 148 return ret;
149 } 149 }
150 150
@@ -164,7 +164,7 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
164 164
165static int mc13xxx_spi_remove(struct spi_device *spi) 165static int mc13xxx_spi_remove(struct spi_device *spi)
166{ 166{
167 struct mc13xxx *mc13xxx = dev_get_drvdata(&spi->dev); 167 struct mc13xxx *mc13xxx = spi_get_drvdata(spi);
168 168
169 mc13xxx_common_cleanup(mc13xxx); 169 mc13xxx_common_cleanup(mc13xxx);
170 170