Commit 2ad3cfba authored by Rusty Russell's avatar Rusty Russell

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: default avatarRusty 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>
parent ac9d463a
...@@ -166,7 +166,7 @@ int register_virtio_device(struct virtio_device *dev) ...@@ -166,7 +166,7 @@ int register_virtio_device(struct virtio_device *dev)
int err; int err;
dev->dev.bus = &virtio_bus; 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 /* We always start by resetting the device, in case a previous
* driver messed it up. This also tests that code path a little. */ * driver messed it up. This also tests that code path a little. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment