summaryrefslogtreecommitdiff
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-04 21:33:19 -0700
committerDavid S. Miller <davem@davemloft.net>2009-05-04 21:33:19 -0700
commitc7ae011dc8306d982c25fb4f679752e790a08dc4 (patch)
treef5ba5370f13272d1cfc43496b4f2b02352e15209 /drivers/net/ibmveth.c
parent088eb2d905de9518dad913995bb8aef493d4a7c5 (diff)
downloadlwn-c7ae011dc8306d982c25fb4f679752e790a08dc4.tar.gz
lwn-c7ae011dc8306d982c25fb4f679752e790a08dc4.zip
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_
return -ENOMEM;
adapter = netdev_priv(netdev);
- dev->dev.driver_data = netdev;
+ dev_set_drvdata(&dev->dev, netdev);
adapter->vdev = dev;
adapter->netdev = netdev;
@@ -1341,7 +1341,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
static int __devexit ibmveth_remove(struct vio_dev *dev)
{
- struct net_device *netdev = dev->dev.driver_data;
+ struct net_device *netdev = dev_get_drvdata(&dev->dev);
struct ibmveth_adapter *adapter = netdev_priv(netdev);
int i;
@@ -1474,8 +1474,8 @@ const char * buf, size_t count)
struct ibmveth_buff_pool *pool = container_of(kobj,
struct ibmveth_buff_pool,
kobj);
- struct net_device *netdev =
- container_of(kobj->parent, struct device, kobj)->driver_data;
+ struct net_device *netdev = dev_get_drvdata(
+ container_of(kobj->parent, struct device, kobj));
struct ibmveth_adapter *adapter = netdev_priv(netdev);
long value = simple_strtol(buf, NULL, 10);
long rc;