Staging: hv: osd.h: fix GUID reference problem

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, September 16, 2009 - 9:07 am

Gitweb:     http://git.kernel.org/linus/daaa8cc31fbd2b7356a0d67dd9ca6d336507f118
Commit:     daaa8cc31fbd2b7356a0d67dd9ca6d336507f118
Parent:     caf26a31b51a148f70113700fd4f9860b5da3931
Author:     Greg Kroah-Hartman <gregkh@suse.de>
AuthorDate: Wed Aug 19 16:18:56 2009 -0700
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Tue Sep 15 12:01:56 2009 -0700

    Staging: hv: osd.h: fix GUID reference problem
    
    As GUID was a typedef, it hid the fact that we were passing it
    a 2 variables in functions.  This fixes this up by passing it
    as a pointer, as it should be.
    
    Cc: Hank Janssen <hjanssen@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/hv/ChannelMgmt.c      |    4 ++--
 drivers/staging/hv/Vmbus.c            |    4 ++--
 drivers/staging/hv/VmbusPrivate.h     |    4 ++--
 drivers/staging/hv/include/VmbusApi.h |    2 +-
 drivers/staging/hv/vmbus_drv.c        |   22 ++++++++++++----------
 5 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index f96cba7..ec078bd 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -284,8 +284,8 @@ VmbusChannelProcessOffer(
 	/* Start the process of binding this offer to the driver */
 	/* We need to set the DeviceObject field before calling VmbusChildDeviceAdd() */
 	newChannel->DeviceObject = VmbusChildDeviceCreate(
-		newChannel->OfferMsg.Offer.InterfaceType,
-		newChannel->OfferMsg.Offer.InterfaceInstance,
+		&newChannel->OfferMsg.Offer.InterfaceType,
+		&newChannel->OfferMsg.Offer.InterfaceInstance,
 		newChannel);
 
 	DPRINT_DBG(VMBUS, "child device object allocated - %p", newChannel->DeviceObject);
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 56e8cbb..58ed469 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -231,8 +231,8 @@ Description:
 
 --*/
 
-struct hv_device *VmbusChildDeviceCreate(struct hv_guid DeviceType,
-					 struct hv_guid DeviceInstance,
+struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
+					 struct hv_guid *DeviceInstance,
 					 void *Context)
 {
 	VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index fed0360..928735e 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -103,8 +103,8 @@ extern struct VMBUS_CONNECTION gVmbusConnection;
 
 /* General vmbus interface */
 
-struct hv_device *VmbusChildDeviceCreate(struct hv_guid deviceType,
-					 struct hv_guid deviceInstance,
+struct hv_device *VmbusChildDeviceCreate(struct hv_guid *deviceType,
+					 struct hv_guid *deviceInstance,
 					 void *context);
 
 int VmbusChildDeviceAdd(struct hv_device *Device);
diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/include/VmbusApi.h
index e5a7337..d038ad8 100644
--- a/drivers/staging/hv/include/VmbusApi.h
+++ b/drivers/staging/hv/include/VmbusApi.h
@@ -76,7 +76,7 @@ typedef int	(*PFN_ON_ISR)(struct hv_driver *drv);
 typedef void (*PFN_ON_DPC)(struct hv_driver *drv);
 typedef void (*PFN_GET_CHANNEL_OFFERS)(void);
 
-typedef struct hv_device *(*PFN_ON_CHILDDEVICE_CREATE)(struct hv_guid DeviceType, struct hv_guid DeviceInstance, void *Context);
+typedef struct hv_device *(*PFN_ON_CHILDDEVICE_CREATE)(struct hv_guid *DeviceType, struct hv_guid *DeviceInstance, void *Context);
 typedef void (*PFN_ON_CHILDDEVICE_DESTROY)(struct hv_device *Device);
 typedef int (*PFN_ON_CHILDDEVICE_ADD)(struct hv_device *RootDevice, struct hv_device *ChildDevice);
 typedef void (*PFN_ON_CHILDDEVICE_REMOVE)(struct hv_device *Device);
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index f8620e2..5268b51 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -75,7 +75,7 @@ static irqreturn_t vmbus_isr(int irq, void* dev_id);
 static void vmbus_device_release(struct device *device);
 static void vmbus_bus_release(struct device *device);
 
-static struct hv_device *vmbus_child_device_create(struct hv_guid type, struct hv_guid instance, void* context);
+static struct hv_device *vmbus_child_device_create(struct hv_guid *type, struct hv_guid *instance, void *context);
 static void vmbus_child_device_destroy(struct hv_device *device_obj);
 static int vmbus_child_device_register(struct hv_device *root_device_obj, struct hv_device *child_device_obj);
 static void vmbus_child_device_unregister(struct hv_device *child_device_obj);
@@ -565,7 +565,9 @@ Name:	vmbus_child_device_create()
 Desc:	Creates and registers a new child device on the vmbus.
 
 --*/
-static struct hv_device *vmbus_child_device_create(struct hv_guid type, struct hv_guid instance, void* context)
+static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
+						   struct hv_guid *instance,
+						   void *context)
 {
 	struct device_context *child_device_ctx;
 	struct hv_device *child_device_obj;
@@ -586,14 +588,14 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid type, struct h
 		"type {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x%02x%02x},"
 		"id {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x%02x%02x}",
 		&child_device_ctx->device,
-		type.data[3], type.data[2], type.data[1], type.data[0],
-		type.data[5], type.data[4], type.data[7], type.data[6],
-		type.data[8], type.data[9], type.data[10], type.data[11],
-		type.data[12], type.data[13], type.data[14], type.data[15],
-		instance.data[3], instance.data[2], instance.data[1], instance.data[0],
-		instance.data[5], instance.data[4], instance.data[7], instance.data[6],
-		instance.data[8], instance.data[9], instance.data[10], instance.data[11],
-		instance.data[12], instance.data[13], instance.data[14], instance.data[15]);
+		type->data[3], type->data[2], type->data[1], type->data[0],
+		type->data[5], type->data[4], type->data[7], type->data[6],
+		type->data[8], type->data[9], type->data[10], type->data[11],
+		type->data[12], type->data[13], type->data[14], type->data[15],
+		instance->data[3], instance->data[2], instance->data[1], instance->data[0],
+		instance->data[5], instance->data[4], instance->data[7], instance->data[6],
+		instance->data[8], instance->data[9], instance->data[10], instance->data[11],
+		instance->data[12], instance->data[13], instance->data[14], instance->data[15]);
 
 	child_device_obj = &child_device_ctx->device_obj;
 	child_device_obj->context = context;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Staging: hv: osd.h: fix GUID reference problem, Linux Kernel Mailing ..., (Wed Sep 16, 9:07 am)