lkml.org 
[lkml]   [2011]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] virtio: decrement dev_index when device is unregistered
When virtio device is removed, dev_index does not get decremented. 
The next device hotplug event results in consuming the next pci to
the one that is suppose to be available.

Signed-off-by: Takuma Umeya <tumeya@redhat.com>

diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index efb35aa..67fe71d 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -216,6 +216,7 @@ EXPORT_SYMBOL_GPL(register_virtio_device);
void unregister_virtio_device(struct virtio_device *dev)
{
device_unregister(&dev->dev);
+ dev_index--;
}
EXPORT_SYMBOL_GPL(unregister_virtio_device);

--
Umeya, Takuma
Technical Account Manager
Red Hat GSS APAC
+81.3.5798.8584 (direct)
tumeya@redhat.com


\
 
 \ /
  Last update: 2011-04-05 06:53    [W:0.396 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site