]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/staging-hv-blkvsc-fix-up-driver_data-usage.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / staging-hv-blkvsc-fix-up-driver_data-usage.patch
CommitLineData
2cb7cef9
BS
1From foo@baz Fri Jul 24 11:00:10 PDT 2009
2Date: Fri, 24 Jul 2009 11:00:10 -0700
3From: Greg Kroah-Hartman <gregkh@suse.de>
4Subject: Staging: hv: blkvsc: fix up driver_data usage
5
6From: Greg Kroah-Hartman <gregkh@suse.de>
7
8driver_data is gone now from struct device, so use the proper functions
9to access it instead.
10
11Thanks to Bill Pemberton for pointing out this build error.
12
13Cc: Bill Pemberton <wfp5p@viridian.itc.Virginia.EDU>
14Cc: Hank Janssen <hjanssen@microsoft.com>
15Cc: Haiyang Zhang <haiyangz@microsoft.com>
16Signed-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);