summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-06 00:34:18 +0400
committerDavid S. Miller <davem@davemloft.net>2013-04-08 00:48:18 +0400
commit4fa0a0ef292a416210018a1074c7b5056773d649 (patch)
tree067569387c2000ed2bb51e8f5f406177c84a77cb
parent58152cd46f88ea3fb2e518511b8367454b12296a (diff)
downloadlinux-4fa0a0ef292a416210018a1074c7b5056773d649.tar.xz
net: ieee802154: mrf24j40: use spi_get_drvdata() and spi_set_drvdata()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ieee802154/mrf24j40.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 0ca8f88ac538..ca0035116a18 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;