aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-05 00:33:19 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-05 00:33:19 -0400
commitc7ae011dc8306d982c25fb4f679752e790a08dc4 (patch)
treef5ba5370f13272d1cfc43496b4f2b02352e15209 /drivers/net/ibmveth.c
parent088eb2d905de9518dad913995bb8aef493d4a7c5 (diff)
net: remove driver_data direct access of struct device from more drivers
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r--drivers/net/ibmveth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 0a51b0bd1e49..7902e5e16a1a 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1255,7 +1255,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
1255 return -ENOMEM; 1255 return -ENOMEM;
1256 1256
1257 adapter = netdev_priv(netdev); 1257 adapter = netdev_priv(netdev);
1258 dev->dev.driver_data = netdev; 1258 dev_set_drvdata(&dev->dev, netdev);
1259 1259
1260 adapter->vdev = dev; 1260 adapter->vdev = dev;
1261 adapter->netdev = netdev; 1261 adapter->netdev = netdev;
@@ -1341,7 +1341,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
1341 1341
1342static int __devexit ibmveth_remove(struct vio_dev *dev) 1342static int __devexit ibmveth_remove(struct vio_dev *dev)
1343{ 1343{
1344 struct net_device *netdev = dev->dev.driver_data; 1344 struct net_device *netdev = dev_get_drvdata(&dev->dev);
1345 struct ibmveth_adapter *adapter = netdev_priv(netdev); 1345 struct ibmveth_adapter *adapter = netdev_priv(netdev);
1346 int i; 1346 int i;
1347 1347
@@ -1474,8 +1474,8 @@ const char * buf, size_t count)
1474 struct ibmveth_buff_pool *pool = container_of(kobj, 1474 struct ibmveth_buff_pool *pool = container_of(kobj,
1475 struct ibmveth_buff_pool, 1475 struct ibmveth_buff_pool,
1476 kobj); 1476 kobj);
1477 struct net_device *netdev = 1477 struct net_device *netdev = dev_get_drvdata(
1478 container_of(kobj->parent, struct device, kobj)->driver_data; 1478 container_of(kobj->parent, struct device, kobj));
1479 struct ibmveth_adapter *adapter = netdev_priv(netdev); 1479 struct ibmveth_adapter *adapter = netdev_priv(netdev);
1480 long value = simple_strtol(buf, NULL, 10); 1480 long value = simple_strtol(buf, NULL, 10);
1481 long rc; 1481 long rc;