virtio: bus_id for devices should contain 'virtio'
authorRusty Russell <[email protected]>
Fri, 30 May 2008 20:09:41 +0000 (15:09 -0500)
committerRusty Russell <[email protected]>
Fri, 30 May 2008 05:09:42 +0000 (15:09 +1000)
Chris Lalancette <[email protected]> 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 <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Carsten Otte <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Chris Lalancette <[email protected]>
Cc: Anthony Liguori <[email protected]>
drivers/virtio/virtio.c

index 13866789b3561027b803797a95c985f573671fd4..59918dfc3cb79c96f2faede939780603098dd73e 100644 (file)
@@ -166,7 +166,7 @@ int register_virtio_device(struct virtio_device *dev)
        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. */