All of lore.kernel.org
 help / color / mirror / Atom feed
* - spi-add-spi_set_drvdata-and-spi_get_drvdata.patch removed from -mm tree
@ 2007-02-12 22:44 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-12 22:44 UTC (permalink / raw)
  To: ben, ben-linux, dbrownell, mm-commits


The patch titled
     spi: add spi_set_drvdata() and spi_get_drvdata()
has been removed from the -mm tree.  Its filename was
     spi-add-spi_set_drvdata-and-spi_get_drvdata.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: spi: add spi_set_drvdata() and spi_get_drvdata()
From: Ben Dooks <ben@fluff.org>

Add wrappers for getting and setting the driver data using spi_device
instead of using dev_{get|set}_drvdata with &spi->dev, to mirror the
platform_{get|set}_drvdata.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/spi/spi-summary |    2 +-
 include/linux/spi/spi.h       |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff -puN Documentation/spi/spi-summary~spi-add-spi_set_drvdata-and-spi_get_drvdata Documentation/spi/spi-summary
--- a/Documentation/spi/spi-summary~spi-add-spi_set_drvdata-and-spi_get_drvdata
+++ a/Documentation/spi/spi-summary
@@ -312,7 +312,7 @@ might look like this unless you're creat
 		chip = kzalloc(sizeof *chip, GFP_KERNEL);
 		if (!chip)
 			return -ENOMEM;
-		dev_set_drvdata(&spi->dev, chip);
+		spi_set_drvdata(spi, chip);
 
 		... etc
 		return 0;
diff -puN include/linux/spi/spi.h~spi-add-spi_set_drvdata-and-spi_get_drvdata include/linux/spi/spi.h
--- a/include/linux/spi/spi.h~spi-add-spi_set_drvdata-and-spi_get_drvdata
+++ a/include/linux/spi/spi.h
@@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struc
 	spi->controller_state = state;
 }
 
+/* device driver data */
+
+static inline void spi_set_drvdata(struct spi_device *spi, void *data)
+{
+	dev_set_drvdata(&spi->dev, data);
+}
+
+static inline void *spi_get_drvdata(struct spi_device *spi)
+{
+	return dev_get_drvdata(&spi->dev);
+}
 
 struct spi_message;
 
_

Patches currently in -mm which might be from ben@fluff.org are

origin.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-12 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 22:44 - spi-add-spi_set_drvdata-and-spi_get_drvdata.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.