summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm831x-spi.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-06 15:42:48 +0900
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-09 12:18:16 +0200
commit0c0d2ab069fa668daeda4204580e359dba178169 (patch)
tree2ec2a3bdaf7d9780d1692d781c1e32856316feb2 /drivers/mfd/wm831x-spi.c
parentb99877f3f7e1c8b7e6d133b56c8bcea4e2f7be80 (diff)
downloadop-kernel-dev-0c0d2ab069fa668daeda4204580e359dba178169.zip
op-kernel-dev-0c0d2ab069fa668daeda4204580e359dba178169.tar.gz
mfd: wm831x: 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/wm831x-spi.c')
-rw-r--r--drivers/mfd/wm831x-spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/wm831x-spi.c b/drivers/mfd/wm831x-spi.c
index 4e70e15..e7ed14f66 100644
--- a/drivers/mfd/wm831x-spi.c
+++ b/drivers/mfd/wm831x-spi.c
@@ -37,7 +37,7 @@ static int wm831x_spi_probe(struct spi_device *spi)
spi->bits_per_word = 16;
spi->mode = SPI_MODE_0;
- dev_set_drvdata(&spi->dev, wm831x);
+ spi_set_drvdata(spi, wm831x);
wm831x->dev = &spi->dev;
wm831x->regmap = devm_regmap_init_spi(spi, &wm831x_regmap_config);
@@ -53,7 +53,7 @@ static int wm831x_spi_probe(struct spi_device *spi)
static int wm831x_spi_remove(struct spi_device *spi)
{
- struct wm831x *wm831x = dev_get_drvdata(&spi->dev);
+ struct wm831x *wm831x = spi_get_drvdata(spi);
wm831x_device_exit(wm831x);
@@ -69,7 +69,7 @@ static int wm831x_spi_suspend(struct device *dev)
static void wm831x_spi_shutdown(struct spi_device *spi)
{
- struct wm831x *wm831x = dev_get_drvdata(&spi->dev);
+ struct wm831x *wm831x = spi_get_drvdata(spi);
wm831x_device_shutdown(wm831x);
}
OpenPOWER on IntegriCloud