linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Input: ads7846 - use spi_get_drvdata() and spi_set_drvdata()
@ 2013-04-06  6:46 Jingoo Han
  2013-04-06  6:46 ` [PATCH 2/3] Input: ad7877 " Jingoo Han
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jingoo Han @ 2013-04-06  6:46 UTC (permalink / raw)
  To: 'Dmitry Torokhov'
  Cc: 'Dmitry Torokhov', linux-input, '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/input/touchscreen/ads7846.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 434c3df..84ccf14 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1245,7 +1245,7 @@ static int ads7846_probe(struct spi_device *spi)
 		goto err_free_mem;
 	}
 
-	dev_set_drvdata(&spi->dev, ts);
+	spi_set_drvdata(spi, ts);
 
 	ts->packet = packet;
 	ts->spi = spi;
@@ -1397,7 +1397,7 @@ static int ads7846_probe(struct spi_device *spi)
 
 static int ads7846_remove(struct spi_device *spi)
 {
-	struct ads7846 *ts = dev_get_drvdata(&spi->dev);
+	struct ads7846 *ts = spi_get_drvdata(spi);
 
 	device_init_wakeup(&spi->dev, false);
 
-- 
1.7.2.5



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

end of thread, other threads:[~2013-04-08  4:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-06  6:46 [PATCH 1/3] Input: ads7846 - use spi_get_drvdata() and spi_set_drvdata() Jingoo Han
2013-04-06  6:46 ` [PATCH 2/3] Input: ad7877 " Jingoo Han
2013-04-06  6:47 ` [PATCH 3/3] Input: adxl34x - use spi_get_drvdata() Jingoo Han
2013-04-08  4:08 ` [PATCH 1/3] Input: ads7846 - use spi_get_drvdata() and spi_set_drvdata() Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).