diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-24 14:00:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 15:01:45 -0400 |
commit | 621d7fb7597e8cc2e24e6b0ca67118b452675d90 (patch) | |
tree | dc4eee53704a578ccdf5abe5da313c3427e82d66 /drivers/staging/hv/netvsc_drv.c | |
parent | 511bda8fe1607ab2e4b2f3b008b7cfbffc2720b1 (diff) |
Staging: hv: netvsc: fix up driver_data usage
driver_data is gone now from struct device, so use the proper functions
to access it instead.
Thanks to Bill Pemberton for pointing out this build error.
Cc: Bill Pemberton <wfp5p@viridian.itc.Virginia.EDU>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/netvsc_drv.c')
-rw-r--r-- | drivers/staging/hv/netvsc_drv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 71931f55319..cd3f3b53f59 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c | |||
@@ -209,14 +209,14 @@ static int netvsc_probe(struct device *device) | |||
209 | 209 | ||
210 | net_device_ctx = netdev_priv(net); | 210 | net_device_ctx = netdev_priv(net); |
211 | net_device_ctx->device_ctx = device_ctx; | 211 | net_device_ctx->device_ctx = device_ctx; |
212 | device->driver_data = net; | 212 | dev_set_drvdata(device, net); |
213 | 213 | ||
214 | // Notify the netvsc driver of the new device | 214 | // Notify the netvsc driver of the new device |
215 | ret = net_drv_obj->Base.OnDeviceAdd(device_obj, (void*)&device_info); | 215 | ret = net_drv_obj->Base.OnDeviceAdd(device_obj, (void*)&device_info); |
216 | if (ret != 0) | 216 | if (ret != 0) |
217 | { | 217 | { |
218 | free_netdev(net); | 218 | free_netdev(net); |
219 | device->driver_data = NULL; | 219 | dev_set_drvdata(device, NULL); |
220 | 220 | ||
221 | DPRINT_ERR(NETVSC_DRV, "unable to add netvsc device (ret %d)", ret); | 221 | DPRINT_ERR(NETVSC_DRV, "unable to add netvsc device (ret %d)", ret); |
222 | return ret; | 222 | return ret; |
@@ -262,7 +262,7 @@ static int netvsc_remove(struct device *device) | |||
262 | NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj; | 262 | NETVSC_DRIVER_OBJECT *net_drv_obj = &net_drv_ctx->drv_obj; |
263 | 263 | ||
264 | struct device_context *device_ctx = device_to_device_context(device); | 264 | struct device_context *device_ctx = device_to_device_context(device); |
265 | struct net_device *net = (struct net_device *)device_ctx->device.driver_data; | 265 | struct net_device *net = dev_get_drvdata(&device_ctx->device); |
266 | DEVICE_OBJECT *device_obj = &device_ctx->device_obj; | 266 | DEVICE_OBJECT *device_obj = &device_ctx->device_obj; |
267 | 267 | ||
268 | DPRINT_ENTER(NETVSC_DRV); | 268 | DPRINT_ENTER(NETVSC_DRV); |
@@ -536,7 +536,7 @@ Desc: Link up/down notification | |||
536 | static void netvsc_linkstatus_callback(DEVICE_OBJECT *device_obj, unsigned int status) | 536 | static void netvsc_linkstatus_callback(DEVICE_OBJECT *device_obj, unsigned int status) |
537 | { | 537 | { |
538 | struct device_context* device_ctx = to_device_context(device_obj); | 538 | struct device_context* device_ctx = to_device_context(device_obj); |
539 | struct net_device* net = (struct net_device *)device_ctx->device.driver_data; | 539 | struct net_device* net = dev_get_drvdata(&device_ctx->device); |
540 | 540 | ||
541 | DPRINT_ENTER(NETVSC_DRV); | 541 | DPRINT_ENTER(NETVSC_DRV); |
542 | 542 | ||
@@ -571,7 +571,7 @@ static int netvsc_recv_callback(DEVICE_OBJECT *device_obj, NETVSC_PACKET* packet | |||
571 | { | 571 | { |
572 | int ret=0; | 572 | int ret=0; |
573 | struct device_context *device_ctx = to_device_context(device_obj); | 573 | struct device_context *device_ctx = to_device_context(device_obj); |
574 | struct net_device *net = (struct net_device *)device_ctx->device.driver_data; | 574 | struct net_device *net = dev_get_drvdata(&device_ctx->device); |
575 | struct net_device_context *net_device_ctx; | 575 | struct net_device_context *net_device_ctx; |
576 | 576 | ||
577 | struct sk_buff *skb; | 577 | struct sk_buff *skb; |