diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2011-01-26 15:12:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-01-31 16:42:48 -0500 |
commit | adf874cb355fcc3293aa489f427f682e708cf586 (patch) | |
tree | 431e516fc3ba32590fecc406913c8d68eaeb66fb | |
parent | c69776771f5fcc49d9a49580234d3a481409c80e (diff) |
staging: hv: Convert camel cased variables in vmbus_drv.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index b33f4972e75..99686f06d2f 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c | |||
@@ -113,7 +113,7 @@ static struct device_attribute vmbus_device_attrs[] = { | |||
113 | }; | 113 | }; |
114 | 114 | ||
115 | /* The one and only one */ | 115 | /* The one and only one */ |
116 | static struct vmbus_driver_context g_vmbus_drv = { | 116 | static struct vmbus_driver_context vmbus_drv = { |
117 | .bus.name = "vmbus", | 117 | .bus.name = "vmbus", |
118 | .bus.match = vmbus_match, | 118 | .bus.match = vmbus_match, |
119 | .bus.shutdown = vmbus_shutdown, | 119 | .bus.shutdown = vmbus_shutdown, |
@@ -123,14 +123,14 @@ static struct vmbus_driver_context g_vmbus_drv = { | |||
123 | .bus.dev_attrs = vmbus_device_attrs, | 123 | .bus.dev_attrs = vmbus_device_attrs, |
124 | }; | 124 | }; |
125 | 125 | ||
126 | static const char *gDriverName = "hyperv"; | 126 | static const char *driver_name = "hyperv"; |
127 | 127 | ||
128 | /* | 128 | /* |
129 | * Windows vmbus does not defined this. | 129 | * Windows vmbus does not defined this. |
130 | * We defined this to be consistent with other devices | 130 | * We defined this to be consistent with other devices |
131 | */ | 131 | */ |
132 | /* {c5295816-f63a-4d5f-8d1a-4daf999ca185} */ | 132 | /* {c5295816-f63a-4d5f-8d1a-4daf999ca185} */ |
133 | static const struct hv_guid gVmbusDeviceType = { | 133 | static const struct hv_guid device_type = { |
134 | .data = { | 134 | .data = { |
135 | 0x16, 0x58, 0x29, 0xc5, 0x3a, 0xf6, 0x5f, 0x4d, | 135 | 0x16, 0x58, 0x29, 0xc5, 0x3a, 0xf6, 0x5f, 0x4d, |
136 | 0x8d, 0x1a, 0x4d, 0xaf, 0x99, 0x9c, 0xa1, 0x85 | 136 | 0x8d, 0x1a, 0x4d, 0xaf, 0x99, 0x9c, 0xa1, 0x85 |
@@ -138,35 +138,35 @@ static const struct hv_guid gVmbusDeviceType = { | |||
138 | }; | 138 | }; |
139 | 139 | ||
140 | /* {ac3760fc-9adf-40aa-9427-a70ed6de95c5} */ | 140 | /* {ac3760fc-9adf-40aa-9427-a70ed6de95c5} */ |
141 | static const struct hv_guid gVmbusDeviceId = { | 141 | static const struct hv_guid device_id = { |
142 | .data = { | 142 | .data = { |
143 | 0xfc, 0x60, 0x37, 0xac, 0xdf, 0x9a, 0xaa, 0x40, | 143 | 0xfc, 0x60, 0x37, 0xac, 0xdf, 0x9a, 0xaa, 0x40, |
144 | 0x94, 0x27, 0xa7, 0x0e, 0xd6, 0xde, 0x95, 0xc5 | 144 | 0x94, 0x27, 0xa7, 0x0e, 0xd6, 0xde, 0x95, 0xc5 |
145 | } | 145 | } |
146 | }; | 146 | }; |
147 | 147 | ||
148 | static struct hv_device *gDevice; /* vmbus root device */ | 148 | static struct hv_device *vmbus_device; /* vmbus root device */ |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * VmbusChildDeviceAdd - Registers the child device with the vmbus | 151 | * VmbusChildDeviceAdd - Registers the child device with the vmbus |
152 | */ | 152 | */ |
153 | int VmbusChildDeviceAdd(struct hv_device *ChildDevice) | 153 | int VmbusChildDeviceAdd(struct hv_device *child_dev) |
154 | { | 154 | { |
155 | return vmbus_child_device_register(gDevice, ChildDevice); | 155 | return vmbus_child_device_register(vmbus_device, child_dev); |
156 | } | 156 | } |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * VmbusOnDeviceAdd - Callback when the root bus device is added | 159 | * VmbusOnDeviceAdd - Callback when the root bus device is added |
160 | */ | 160 | */ |
161 | static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo) | 161 | static int VmbusOnDeviceAdd(struct hv_device *dev, void *info) |
162 | { | 162 | { |
163 | u32 *irqvector = AdditionalInfo; | 163 | u32 *irqvector = info; |
164 | int ret; | 164 | int ret; |
165 | 165 | ||
166 | gDevice = dev; | 166 | vmbus_device = dev; |
167 | 167 | ||
168 | memcpy(&gDevice->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid)); | 168 | memcpy(&vmbus_device->deviceType, &device_type, sizeof(struct hv_guid)); |
169 | memcpy(&gDevice->deviceInstance, &gVmbusDeviceId, | 169 | memcpy(&vmbus_device->deviceInstance, &device_id, |
170 | sizeof(struct hv_guid)); | 170 | sizeof(struct hv_guid)); |
171 | 171 | ||
172 | /* strcpy(dev->name, "vmbus"); */ | 172 | /* strcpy(dev->name, "vmbus"); */ |
@@ -461,9 +461,9 @@ static ssize_t vmbus_show_device_attr(struct device *dev, | |||
461 | */ | 461 | */ |
462 | static int vmbus_bus_init(void) | 462 | static int vmbus_bus_init(void) |
463 | { | 463 | { |
464 | struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv; | 464 | struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv; |
465 | struct hv_driver *driver = &g_vmbus_drv.drv_obj; | 465 | struct hv_driver *driver = &vmbus_drv.drv_obj; |
466 | struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx; | 466 | struct vm_device *dev_ctx = &vmbus_drv.device_ctx; |
467 | int ret; | 467 | int ret; |
468 | unsigned int vector; | 468 | unsigned int vector; |
469 | 469 | ||
@@ -478,8 +478,8 @@ static int vmbus_bus_init(void) | |||
478 | sizeof(struct vmbus_channel_packet_page_buffer), | 478 | sizeof(struct vmbus_channel_packet_page_buffer), |
479 | sizeof(struct vmbus_channel_packet_multipage_buffer)); | 479 | sizeof(struct vmbus_channel_packet_multipage_buffer)); |
480 | 480 | ||
481 | driver->name = gDriverName; | 481 | driver->name = driver_name; |
482 | memcpy(&driver->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid)); | 482 | memcpy(&driver->deviceType, &device_type, sizeof(struct hv_guid)); |
483 | 483 | ||
484 | /* Setup dispatch table */ | 484 | /* Setup dispatch table */ |
485 | driver->OnDeviceAdd = VmbusOnDeviceAdd; | 485 | driver->OnDeviceAdd = VmbusOnDeviceAdd; |
@@ -590,10 +590,10 @@ cleanup: | |||
590 | */ | 590 | */ |
591 | static void vmbus_bus_exit(void) | 591 | static void vmbus_bus_exit(void) |
592 | { | 592 | { |
593 | struct hv_driver *driver = &g_vmbus_drv.drv_obj; | 593 | struct hv_driver *driver = &vmbus_drv.drv_obj; |
594 | struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv; | 594 | struct vmbus_driver_context *vmbus_drv_ctx = &vmbus_drv; |
595 | 595 | ||
596 | struct vm_device *dev_ctx = &g_vmbus_drv.device_ctx; | 596 | struct vm_device *dev_ctx = &vmbus_drv.device_ctx; |
597 | 597 | ||
598 | /* Remove the root device */ | 598 | /* Remove the root device */ |
599 | if (driver->OnDeviceRemove) | 599 | if (driver->OnDeviceRemove) |
@@ -634,7 +634,7 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx) | |||
634 | driver_ctx, driver_ctx->driver.name); | 634 | driver_ctx, driver_ctx->driver.name); |
635 | 635 | ||
636 | /* The child driver on this vmbus */ | 636 | /* The child driver on this vmbus */ |
637 | driver_ctx->driver.bus = &g_vmbus_drv.bus; | 637 | driver_ctx->driver.bus = &vmbus_drv.bus; |
638 | 638 | ||
639 | ret = driver_register(&driver_ctx->driver); | 639 | ret = driver_register(&driver_ctx->driver); |
640 | 640 | ||
@@ -737,7 +737,7 @@ int vmbus_child_device_register(struct hv_device *root_device_obj, | |||
737 | atomic_inc_return(&device_num)); | 737 | atomic_inc_return(&device_num)); |
738 | 738 | ||
739 | /* The new device belongs to this bus */ | 739 | /* The new device belongs to this bus */ |
740 | child_device_ctx->device.bus = &g_vmbus_drv.bus; /* device->dev.bus; */ | 740 | child_device_ctx->device.bus = &vmbus_drv.bus; /* device->dev.bus; */ |
741 | child_device_ctx->device.parent = &root_device_ctx->device; | 741 | child_device_ctx->device.parent = &root_device_ctx->device; |
742 | child_device_ctx->device.release = vmbus_device_release; | 742 | child_device_ctx->device.release = vmbus_device_release; |
743 | 743 | ||
@@ -1050,7 +1050,7 @@ static void vmbus_event_dpc(unsigned long data) | |||
1050 | 1050 | ||
1051 | static irqreturn_t vmbus_isr(int irq, void *dev_id) | 1051 | static irqreturn_t vmbus_isr(int irq, void *dev_id) |
1052 | { | 1052 | { |
1053 | struct hv_driver *driver = &g_vmbus_drv.drv_obj; | 1053 | struct hv_driver *driver = &vmbus_drv.drv_obj; |
1054 | int ret; | 1054 | int ret; |
1055 | 1055 | ||
1056 | /* Call to bus driver to handle interrupt */ | 1056 | /* Call to bus driver to handle interrupt */ |
@@ -1059,10 +1059,10 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) | |||
1059 | /* Schedules a dpc if necessary */ | 1059 | /* Schedules a dpc if necessary */ |
1060 | if (ret > 0) { | 1060 | if (ret > 0) { |
1061 | if (test_bit(0, (unsigned long *)&ret)) | 1061 | if (test_bit(0, (unsigned long *)&ret)) |
1062 | tasklet_schedule(&g_vmbus_drv.msg_dpc); | 1062 | tasklet_schedule(&vmbus_drv.msg_dpc); |
1063 | 1063 | ||
1064 | if (test_bit(1, (unsigned long *)&ret)) | 1064 | if (test_bit(1, (unsigned long *)&ret)) |
1065 | tasklet_schedule(&g_vmbus_drv.event_dpc); | 1065 | tasklet_schedule(&vmbus_drv.event_dpc); |
1066 | 1066 | ||
1067 | return IRQ_HANDLED; | 1067 | return IRQ_HANDLED; |
1068 | } else { | 1068 | } else { |