@@ -1521,7 +1521,7 @@ static int ks8851_probe(struct spi_device *spi)
ndev->ethtool_ops = &ks8851_ethtool_ops;
SET_NETDEV_DEV(ndev, dev);
- spi_set_drvdata(spi, ks);
+ dev_set_drvdata(dev, ks);
netif_carrier_off(ks->netdev);
ndev->if_port = IF_PORT_100BASET;
@@ -1570,8 +1570,8 @@ static int ks8851_probe(struct spi_device *spi)
static int ks8851_remove(struct spi_device *spi)
{
- struct ks8851_net *priv = spi_get_drvdata(spi);
struct device *dev = &spi->dev;
+ struct ks8851_net *priv = dev_get_drvdata(dev);
if (netif_msg_drv(priv))
dev_info(dev, "remove\n");
Replace spi_{get,set}_drvdata() with dev_{get,set}_drvdata(), which works for both SPI and platform drivers. This is done in preparation for unifying the KS8851 SPI and parallel bus drivers. There should be no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: David S. Miller <davem@davemloft.net> Cc: Lukas Wunner <lukas@wunner.de> Cc: Petr Stetiar <ynezz@true.cz> Cc: YueHaibing <yuehaibing@huawei.com> --- drivers/net/ethernet/micrel/ks8851.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)