lkml.org 
[lkml]   [2008]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 1/3] virtio: bus_id for devices should contain 'virtio'
Chris Lalancette <clalance@redhat.com> points out that virtio.c sets all device
names to '0', '1', etc, which looks silly in /proc/interrupts. We change this
from '%d' to 'virtio%d'.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chris Lalancette <clalance@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>
---
drivers/virtio/virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff -r 2f0d0ce2adbf drivers/virtio/virtio.c
--- a/drivers/virtio/virtio.c Fri May 23 11:55:02 2008 +1000
+++ b/drivers/virtio/virtio.c Fri May 23 12:23:39 2008 +1000
@@ -166,7 +169,7 @@ int register_virtio_device(struct virtio
int err;

dev->dev.bus = &virtio_bus;
- sprintf(dev->dev.bus_id, "%u", dev->index);
+ sprintf(dev->dev.bus_id, "virtio%u", dev->index);

/* We always start by resetting the device, in case a previous
* driver messed it up. This also tests that code path a little. */


\
 
 \ /
  Last update: 2008-05-23 04:51    [W:0.024 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site