diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-05 16:36:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-07 16:48:19 -0400 |
commit | 5743756161518f279ad0bd21437713f7bc3f0a81 (patch) | |
tree | a562cc4914867938faf2fec7bb110953745fed98 /drivers/net/ethernet/microchip | |
parent | 8f996607824dba3c808bb7ed3f8f82670120383e (diff) |
net: ethernet: enc28j60: 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>
Diffstat (limited to 'drivers/net/ethernet/microchip')
-rw-r--r-- | drivers/net/ethernet/microchip/enc28j60.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c index 5d98a9f7bfc7..c7b40aa21f22 100644 --- a/drivers/net/ethernet/microchip/enc28j60.c +++ b/drivers/net/ethernet/microchip/enc28j60.c | |||
@@ -1566,7 +1566,7 @@ static int enc28j60_probe(struct spi_device *spi) | |||
1566 | INIT_WORK(&priv->setrx_work, enc28j60_setrx_work_handler); | 1566 | INIT_WORK(&priv->setrx_work, enc28j60_setrx_work_handler); |
1567 | INIT_WORK(&priv->irq_work, enc28j60_irq_work_handler); | 1567 | INIT_WORK(&priv->irq_work, enc28j60_irq_work_handler); |
1568 | INIT_WORK(&priv->restart_work, enc28j60_restart_work_handler); | 1568 | INIT_WORK(&priv->restart_work, enc28j60_restart_work_handler); |
1569 | dev_set_drvdata(&spi->dev, priv); /* spi to priv reference */ | 1569 | spi_set_drvdata(spi, priv); /* spi to priv reference */ |
1570 | SET_NETDEV_DEV(dev, &spi->dev); | 1570 | SET_NETDEV_DEV(dev, &spi->dev); |
1571 | 1571 | ||
1572 | if (!enc28j60_chipset_init(dev)) { | 1572 | if (!enc28j60_chipset_init(dev)) { |
@@ -1618,7 +1618,7 @@ error_alloc: | |||
1618 | 1618 | ||
1619 | static int enc28j60_remove(struct spi_device *spi) | 1619 | static int enc28j60_remove(struct spi_device *spi) |
1620 | { | 1620 | { |
1621 | struct enc28j60_net *priv = dev_get_drvdata(&spi->dev); | 1621 | struct enc28j60_net *priv = spi_get_drvdata(spi); |
1622 | 1622 | ||
1623 | if (netif_msg_drv(priv)) | 1623 | if (netif_msg_drv(priv)) |
1624 | printk(KERN_DEBUG DRV_NAME ": remove\n"); | 1624 | printk(KERN_DEBUG DRV_NAME ": remove\n"); |