Skip to content

Commit

Permalink
virtio: bus_id for devices should contain 'virtio'
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rustyrussell committed May 30, 2008
1 parent ac9d463 commit 2ad3cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virtio/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 2ad3cfb

Please sign in to comment.