mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Samuel Ortiz'" <sameo@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, "'Jingoo Han'" <jg1.han@samsung.com>
Subject: [PATCH 2/6] mfd: da9052: use spi_get_drvdata() and spi_set_drvdata()
Date: Sat, 06 Apr 2013 15:43:23 +0900	[thread overview]
Message-ID: <001801ce3292$0925a880$1b70f980$%han@samsung.com> (raw)
In-Reply-To: <001701ce3291$f3f29090$dbd7b1b0$%han@samsung.com>

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/da9052-spi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
index 61d63b9..0680bcb 100644
--- a/drivers/mfd/da9052-spi.c
+++ b/drivers/mfd/da9052-spi.c
@@ -38,7 +38,7 @@ static int da9052_spi_probe(struct spi_device *spi)
 	da9052->dev = &spi->dev;
 	da9052->chip_irq = spi->irq;
 
-	dev_set_drvdata(&spi->dev, da9052);
+	spi_set_drvdata(spi, da9052);
 
 	da9052_regmap_config.read_flag_mask = 1;
 	da9052_regmap_config.write_flag_mask = 0;
@@ -60,7 +60,7 @@ static int da9052_spi_probe(struct spi_device *spi)
 
 static int da9052_spi_remove(struct spi_device *spi)
 {
-	struct da9052 *da9052 = dev_get_drvdata(&spi->dev);
+	struct da9052 *da9052 = spi_get_drvdata(spi);
 
 	da9052_device_exit(da9052);
 	return 0;
-- 
1.7.2.5



  reply	other threads:[~2013-04-06  6:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06  6:42 [PATCH 1/6] mfd: wm831x: " Jingoo Han
2013-04-06  6:43 ` Jingoo Han [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001801ce3292$0925a880$1b70f980$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®