staging: vt6655: do not use PCI resources before pci_enable_device()
authorKulikov Vasiliy <segooon@gmail.com>
Tue, 3 Aug 2010 15:44:20 +0000 (19:44 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 18:13:57 +0000 (11:13 -0700)
commit13b631a599cddabc1cbb3a2fb862aee5ceb6e427
tree7282d0acf5ea7cd0e37fbd669e5da61b87d66c8c
parentbd2bc4c763db8a9c6eeef0d2cf6f384514b6cb6c
staging: vt6655: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vt6655/device_main.c