mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/6] mfd: wm831x: use spi_get_drvdata() and spi_set_drvdata()
@ 2013-04-06  6:42 Jingoo Han
  2013-04-06  6:43 ` [PATCH 2/6] mfd: da9052: " Jingoo Han
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jingoo Han @ 2013-04-06  6:42 UTC (permalink / raw)
  To: 'Samuel Ortiz'; +Cc: linux-kernel, 'Jingoo Han'

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>
---
 drivers/mfd/wm831x-spi.c |    6 +++---
 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);
 }
-- 
1.7.2.5



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-04-09 10:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-06  6:42 [PATCH 1/6] mfd: wm831x: use spi_get_drvdata() and spi_set_drvdata() Jingoo Han
2013-04-06  6:43 ` [PATCH 2/6] mfd: da9052: " Jingoo Han
2013-04-06  6:43 ` [PATCH 3/6] mfd: ezx-pcap: " Jingoo Han
2013-04-06  6:44 ` [PATCH 4/6] mfd: mc13xxx: " Jingoo Han
2013-04-06  6:44 ` [PATCH 5/6] mfd: arizona: use spi_get_drvdata() Jingoo Han
2013-04-06  6:44 ` [PATCH 6/6] mfd: stmpe: " Jingoo Han
2013-04-09 10:18 ` [PATCH 1/6] mfd: wm831x: use spi_get_drvdata() and spi_set_drvdata() Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®