aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-04-30 08:19:31 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-01 18:21:55 -0400
commit1aec5bdfed91b50aedbcad43393bcb05033c7ef3 (patch)
tree258db4a51298bc18f859170e8d611a8e3b406b0f /drivers/net/usb
parentaba7453037c3a90714caae77a622dceaf1173786 (diff)
net: remove driver_data direct access of struct device
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. Cc: netdev@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r--drivers/net/usb/hso.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index d696e5fbc176..837135f0390a 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -482,7 +482,7 @@ static ssize_t hso_sysfs_show_porttype(struct device *dev,
482 struct device_attribute *attr, 482 struct device_attribute *attr,
483 char *buf) 483 char *buf)
484{ 484{
485 struct hso_device *hso_dev = dev->driver_data; 485 struct hso_device *hso_dev = dev_get_drvdata(dev);
486 char *port_name; 486 char *port_name;
487 487
488 if (!hso_dev) 488 if (!hso_dev)
@@ -2313,7 +2313,7 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,
2313 serial->parent->dev = tty_register_device(tty_drv, minor, 2313 serial->parent->dev = tty_register_device(tty_drv, minor,
2314 &serial->parent->interface->dev); 2314 &serial->parent->interface->dev);
2315 dev = serial->parent->dev; 2315 dev = serial->parent->dev;
2316 dev->driver_data = serial->parent; 2316 dev_set_drvdata(dev, serial->parent);
2317 i = device_create_file(dev, &dev_attr_hsotype); 2317 i = device_create_file(dev, &dev_attr_hsotype);
2318 2318
2319 /* fill in specific data for later use */ 2319 /* fill in specific data for later use */