[PATCH] pci: fix no_pci_devices()

From: Vegard Nossum
Date: Sat Dec 20 2008 - 05:55:28 EST


On Sat, Dec 20, 2008 at 9:58 AM, Greg KH <gregkh@xxxxxxx> wrote:
> Care to make a patch for no_pci_devices() to work properly in this kind
> of situation?

How does this look?

I have introduced a variable pci_is_initiated, which is set after the bus
has been registered.

Should the variable be atomic? My assumption is that initcalls are
synchronous and that the variable therefore cannot be accessed concurrently
by two or more CPUs.


Vegard