rt2x00: do not use PCI resources before pci_enable_device()
authorKulikov Vasiliy <segooon@gmail.com>
Tue, 3 Aug 2010 15:43:22 +0000 (19:43 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 4 Aug 2010 19:28:37 +0000 (15:28 -0400)
commit47cb905d6b1f46bf403998f4838baa3f3b597391
tree08de40b5141e70b434d5f77bbc44898c83a2c67c
parent93c08c32914264f539baf7f04cce310a0dd30a7a
rt2x00: 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: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00pci.c