Skip to contentSkip to conversation

virtio: bus_id for devices should contain 'virtio'

PATCH New Rusty Russell 1 participant 1 message May 23, 2008 virtio core

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 virtio: bus_id for devices should contain 'virtio'

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'.

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/virtio.c +1 -1
diff -r 2f0d0ce2adbf drivers/virtio/virtio.c
@@ -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. */