aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/vmbus_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hv/vmbus_drv.c')
-rw-r--r--drivers/hv/vmbus_drv.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 4748086eaaf..8e1a9ec5300 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -34,6 +34,7 @@
34#include <linux/completion.h> 34#include <linux/completion.h>
35#include <linux/hyperv.h> 35#include <linux/hyperv.h>
36#include <asm/hyperv.h> 36#include <asm/hyperv.h>
37#include <asm/hypervisor.h>
37#include "hyperv_vmbus.h" 38#include "hyperv_vmbus.h"
38 39
39 40
@@ -146,43 +147,9 @@ static ssize_t vmbus_show_device_attr(struct device *dev,
146 get_channel_info(hv_dev, device_info); 147 get_channel_info(hv_dev, device_info);
147 148
148 if (!strcmp(dev_attr->attr.name, "class_id")) { 149 if (!strcmp(dev_attr->attr.name, "class_id")) {
149 ret = sprintf(buf, "{%02x%02x%02x%02x-%02x%02x-%02x%02x-" 150 ret = sprintf(buf, "{%pUl}\n", device_info->chn_type.b);
150 "%02x%02x%02x%02x%02x%02x%02x%02x}\n",
151 device_info->chn_type.b[3],
152 device_info->chn_type.b[2],
153 device_info->chn_type.b[1],
154 device_info->chn_type.b[0],
155 device_info->chn_type.b[5],
156 device_info->chn_type.b[4],
157 device_info->chn_type.b[7],
158 device_info->chn_type.b[6],
159 device_info->chn_type.b[8],
160 device_info->chn_type.b[9],
161 device_info->chn_type.b[10],
162 device_info->chn_type.b[11],
163 device_info->chn_type.b[12],
164 device_info->chn_type.b[13],
165 device_info->chn_type.b[14],
166 device_info->chn_type.b[15]);
167 } else if (!strcmp(dev_attr->attr.name, "device_id")) { 151 } else if (!strcmp(dev_attr->attr.name, "device_id")) {
168 ret = sprintf(buf, "{%02x%02x%02x%02x-%02x%02x-%02x%02x-" 152 ret = sprintf(buf, "{%pUl}\n", device_info->chn_instance.b);
169 "%02x%02x%02x%02x%02x%02x%02x%02x}\n",
170 device_info->chn_instance.b[3],
171 device_info->chn_instance.b[2],
172 device_info->chn_instance.b[1],
173 device_info->chn_instance.b[0],
174 device_info->chn_instance.b[5],
175 device_info->chn_instance.b[4],
176 device_info->chn_instance.b[7],
177 device_info->chn_instance.b[6],
178 device_info->chn_instance.b[8],
179 device_info->chn_instance.b[9],
180 device_info->chn_instance.b[10],
181 device_info->chn_instance.b[11],
182 device_info->chn_instance.b[12],
183 device_info->chn_instance.b[13],
184 device_info->chn_instance.b[14],
185 device_info->chn_instance.b[15]);
186 } else if (!strcmp(dev_attr->attr.name, "modalias")) { 153 } else if (!strcmp(dev_attr->attr.name, "modalias")) {
187 print_alias_name(hv_dev, alias_name); 154 print_alias_name(hv_dev, alias_name);
188 ret = sprintf(buf, "vmbus:%s\n", alias_name); 155 ret = sprintf(buf, "vmbus:%s\n", alias_name);
@@ -757,6 +724,9 @@ static int __init hv_acpi_init(void)
757{ 724{
758 int ret, t; 725 int ret, t;
759 726
727 if (x86_hyper != &x86_hyper_ms_hyperv)
728 return -ENODEV;
729
760 init_completion(&probe_event); 730 init_completion(&probe_event);
761 731
762 /* 732 /*