diff options
Diffstat (limited to 'drivers/virtio/virtio.c')
-rw-r--r-- | drivers/virtio/virtio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 3a43ebf83a49..efb35aa8309a 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -9,19 +9,19 @@ static ssize_t device_show(struct device *_d, | |||
9 | struct device_attribute *attr, char *buf) | 9 | struct device_attribute *attr, char *buf) |
10 | { | 10 | { |
11 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); | 11 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); |
12 | return sprintf(buf, "%hu", dev->id.device); | 12 | return sprintf(buf, "0x%04x\n", dev->id.device); |
13 | } | 13 | } |
14 | static ssize_t vendor_show(struct device *_d, | 14 | static ssize_t vendor_show(struct device *_d, |
15 | struct device_attribute *attr, char *buf) | 15 | struct device_attribute *attr, char *buf) |
16 | { | 16 | { |
17 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); | 17 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); |
18 | return sprintf(buf, "%hu", dev->id.vendor); | 18 | return sprintf(buf, "0x%04x\n", dev->id.vendor); |
19 | } | 19 | } |
20 | static ssize_t status_show(struct device *_d, | 20 | static ssize_t status_show(struct device *_d, |
21 | struct device_attribute *attr, char *buf) | 21 | struct device_attribute *attr, char *buf) |
22 | { | 22 | { |
23 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); | 23 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); |
24 | return sprintf(buf, "0x%08x", dev->config->get_status(dev)); | 24 | return sprintf(buf, "0x%08x\n", dev->config->get_status(dev)); |
25 | } | 25 | } |
26 | static ssize_t modalias_show(struct device *_d, | 26 | static ssize_t modalias_show(struct device *_d, |
27 | struct device_attribute *attr, char *buf) | 27 | struct device_attribute *attr, char *buf) |