[PATCH 07/13] staging/hv: use struct device_info
Joe Perches
joe at perches.com
Thu Jul 30 00:41:00 UTC 2009
Signed-off-by: Joe Perches <joe at perches.com>
---
drivers/staging/hv/ChannelInterface.c | 3 ++-
drivers/staging/hv/ChannelInterface.h | 3 ++-
drivers/staging/hv/Vmbus.c | 6 ++++--
drivers/staging/hv/include/VmbusApi.h | 6 +++---
drivers/staging/hv/vmbus_drv.c | 8 ++++----
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 3f5f4c1..4de58dd 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -128,7 +128,8 @@ static void GetChannelInterface(VMBUS_CHANNEL_INTERFACE * ChannelInterface)
ChannelInterface->GetInfo = GetChannelInfo;
}
-static void GetChannelInfo(struct hv_device *Device, DEVICE_INFO * DeviceInfo)
+static void GetChannelInfo(struct hv_device *Device,
+ struct device_info *DeviceInfo)
{
VMBUS_CHANNEL_DEBUG_INFO debugInfo;
diff --git a/drivers/staging/hv/ChannelInterface.h b/drivers/staging/hv/ChannelInterface.h
index ea9f84c..ac94033 100644
--- a/drivers/staging/hv/ChannelInterface.h
+++ b/drivers/staging/hv/ChannelInterface.h
@@ -28,6 +28,7 @@
static void GetChannelInterface(VMBUS_CHANNEL_INTERFACE * ChannelInterface);
-static void GetChannelInfo(struct hv_device *Device, DEVICE_INFO * DeviceInfo);
+static void GetChannelInfo(struct hv_device *Device,
+ struct device_info *DeviceInfo);
#endif /* _CHANNEL_INTERFACE_H_ */
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index ef8e136..5de1114 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -56,7 +56,8 @@ static struct hv_device *gDevice; /* vmbus root device */
static void VmbusGetChannelInterface(VMBUS_CHANNEL_INTERFACE * Interface);
static void
-VmbusGetChannelInfo(struct hv_device *DeviceObject, DEVICE_INFO * DeviceInfo);
+VmbusGetChannelInfo(struct hv_device *DeviceObject,
+ struct device_info *DeviceInfo);
static void VmbusGetChannelOffers(void
);
@@ -172,7 +173,8 @@ Description:
--*/
static void
-VmbusGetChannelInfo(struct hv_device *DeviceObject, DEVICE_INFO * DeviceInfo)
+VmbusGetChannelInfo(struct hv_device *DeviceObject,
+ struct device_info *DeviceInfo)
{
GetChannelInfo(DeviceObject, DeviceInfo);
}
diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/include/VmbusApi.h
index 515a8ef..066402e 100644
--- a/drivers/staging/hv/include/VmbusApi.h
+++ b/drivers/staging/hv/include/VmbusApi.h
@@ -144,7 +144,7 @@ struct port_info {
u32 BytesAvailToWrite;
};
-typedef struct _DEVICE_INFO {
+struct device_info {
u32 ChannelId;
u32 ChannelState;
GUID ChannelType;
@@ -160,10 +160,10 @@ typedef struct _DEVICE_INFO {
struct port_info Inbound;
struct port_info Outbound;
-} DEVICE_INFO;
+};
typedef void (*VMBUS_GET_CHANNEL_INFO) (struct hv_device * Device,
- DEVICE_INFO * DeviceInfo);
+ struct device_info *DeviceInfo);
typedef struct _VMBUS_CHANNEL_INTERFACE {
VMBUS_CHANNEL_OPEN Open;
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index eeb91cb..00cd44d 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -77,7 +77,7 @@ 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);
static void vmbus_child_device_get_info(struct hv_device *device_obj,
- DEVICE_INFO * device_info);
+ struct device_info *device_info);
/* static ssize_t vmbus_show_class_id(struct device *dev, struct device_attribute *attr, char *buf); */
/* static ssize_t vmbus_show_device_id(struct device *dev, struct device_attribute *attr, char *buf); */
@@ -156,9 +156,9 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
char *buf)
{
struct device_context *device_ctx = device_to_device_context(dev);
- DEVICE_INFO device_info;
+ struct device_info device_info;
- memset(&device_info, 0, sizeof(DEVICE_INFO));
+ memset(&device_info, 0, sizeof(struct device_info));
vmbus_child_device_get_info(&device_ctx->device_obj, &device_info);
@@ -527,7 +527,7 @@ Name: vmbus_child_device_get_info()
Desc: Get the vmbus child device info. This is invoked to display various device attributes in sysfs.
--*/
static void vmbus_child_device_get_info(struct hv_device *device_obj,
- DEVICE_INFO * device_info)
+ struct device_info *device_info)
{
struct vmbus_driver_object *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
--
1.6.3.1.10.g659a0.dirty
More information about the devel
mailing list