uio: do not use PCI resources before pci_enable_device()
commit1037246cacd45d951227c8798f181b3ba5c8bcbe
authorKulikov Vasiliy <segooon@gmail.com>
Tue, 3 Aug 2010 15:44:23 +0000 (3 19:44 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:16:42 +0000 (22 10:16 -0700)
treedbf5580c239ddd84ec4bd6c8479a60d55a62f5d9
parentd79d32440c33cf60f1e0efbeb8144b1647be0b50
uio: do not use PCI resources before pci_enable_device()

IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.

The semantic match that finds this problem is as follows:

// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@

(
* x->irq
|
* x->resource
|
* request(x, ...)
)
 ...
*pci_enable_device(x)
// </smpl>

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/uio/uio_pci_generic.c