netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] net: ieee802154: mrf24j40: use spi_get_drvdata() and spi_set_drvdata()
@ 2013-04-06  6:34 Jingoo Han
  2013-04-06  6:35 ` [PATCH 2/7] net: can: mcp251x: " Jingoo Han
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jingoo Han @ 2013-04-06  6:34 UTC (permalink / raw)
  To: 'David S. Miller'; +Cc: netdev, '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/net/ieee802154/mrf24j40.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 0ca8f88..ca00351 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -648,7 +648,7 @@ static int mrf24j40_probe(struct spi_device *spi)
 	init_completion(&devrec->tx_complete);
 	INIT_WORK(&devrec->irqwork, mrf24j40_isrwork);
 	devrec->spi = spi;
-	dev_set_drvdata(&spi->dev, devrec);
+	spi_set_drvdata(spi, devrec);
 
 	/* Register with the 802154 subsystem */
 
@@ -720,7 +720,7 @@ err_devrec:
 
 static int mrf24j40_remove(struct spi_device *spi)
 {
-	struct mrf24j40 *devrec = dev_get_drvdata(&spi->dev);
+	struct mrf24j40 *devrec = spi_get_drvdata(spi);
 
 	dev_dbg(printdev(devrec), "remove\n");
 
@@ -732,7 +732,7 @@ static int mrf24j40_remove(struct spi_device *spi)
 	 * complete? */
 
 	/* Clean up the SPI stuff. */
-	dev_set_drvdata(&spi->dev, NULL);
+	spi_set_drvdata(spi, NULL);
 	kfree(devrec->buf);
 	kfree(devrec);
 	return 0;
-- 
1.7.2.5

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

end of thread, other threads:[~2013-04-07 20:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-06  6:34 [PATCH 1/7] net: ieee802154: mrf24j40: use spi_get_drvdata() and spi_set_drvdata() Jingoo Han
2013-04-06  6:35 ` [PATCH 2/7] net: can: mcp251x: " Jingoo Han
2013-04-06  6:35 ` [PATCH 3/7] net: ethernet: ks8851: " Jingoo Han
2013-04-06  6:36 ` [PATCH 4/7] net: ethernet: enc28j60: " Jingoo Han
2013-04-06  6:36 ` [PATCH 5/7] net: wireless: wl1251: " Jingoo Han
2013-04-06  6:36 ` [PATCH 6/7] net: wireless: p54spi: " Jingoo Han
2013-04-06  6:37 ` [PATCH 7/7] net: phy: spi_ks8995: " Jingoo Han
2013-04-07 20:48 ` [PATCH 1/7] net: ieee802154: mrf24j40: " David Miller

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).