]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From foo@baz Fri Jul 24 11:00:10 PDT 2009 |
2 | Date: Fri, 24 Jul 2009 11:00:10 -0700 | |
3 | From: Greg Kroah-Hartman <gregkh@suse.de> | |
4 | Subject: Staging: hv: blkvsc: fix up driver_data usage | |
5 | ||
6 | From: Greg Kroah-Hartman <gregkh@suse.de> | |
7 | ||
8 | driver_data is gone now from struct device, so use the proper functions | |
9 | to access it instead. | |
10 | ||
11 | Thanks to Bill Pemberton for pointing out this build error. | |
12 | ||
13 | Cc: Bill Pemberton <wfp5p@viridian.itc.Virginia.EDU> | |
14 | Cc: Hank Janssen <hjanssen@microsoft.com> | |
15 | Cc: Haiyang Zhang <haiyangz@microsoft.com> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
17 | ||
18 | --- | |
19 | drivers/staging/hv/blkvsc_drv.c | 6 +++--- | |
20 | 1 file changed, 3 insertions(+), 3 deletions(-) | |
21 | ||
22 | --- a/drivers/staging/hv/blkvsc_drv.c | |
23 | +++ b/drivers/staging/hv/blkvsc_drv.c | |
24 | @@ -341,7 +341,7 @@ static int blkvsc_probe(struct device *d | |
25 | blkdev->target = device_info.TargetId; // this identified the device 0 or 1 | |
26 | blkdev->path = device_info.PathId; // this identified the ide ctrl 0 or 1 | |
27 | ||
28 | - device->driver_data = blkdev; | |
29 | + dev_set_drvdata(device, blkdev); | |
30 | ||
31 | // Calculate the major and device num | |
32 | if (blkdev->path == 0) | |
33 | @@ -457,7 +457,7 @@ Cleanup: | |
34 | ||
35 | static void blkvsc_shutdown(struct device *device) | |
36 | { | |
37 | - struct block_device_context *blkdev = (struct block_device_context*)device->driver_data; | |
38 | + struct block_device_context *blkdev = dev_get_drvdata(device); | |
39 | unsigned long flags; | |
40 | ||
41 | if (!blkdev) | |
42 | @@ -786,7 +786,7 @@ static int blkvsc_remove(struct device * | |
43 | ||
44 | struct device_context *device_ctx = device_to_device_context(device); | |
45 | DEVICE_OBJECT* device_obj = &device_ctx->device_obj; | |
46 | - struct block_device_context *blkdev = (struct block_device_context*)device->driver_data; | |
47 | + struct block_device_context *blkdev = dev_get_drvdata(device); | |
48 | unsigned long flags; | |
49 | ||
50 | DPRINT_ENTER(BLKVSC_DRV); |