mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
use no_pci_devices() in pci/search.c
We have an API function for this now. Cc: Zhang Yanmin <yanmin.zhang@intel.com> Cc: Greg KH <greg@kroah.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ed4aaadb1a
commit
35ef63f635
@ -202,7 +202,7 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor,
|
|||||||
* can cause some machines to crash. So here we detect and flag that
|
* can cause some machines to crash. So here we detect and flag that
|
||||||
* situation and bail out early.
|
* situation and bail out early.
|
||||||
*/
|
*/
|
||||||
if (unlikely(list_empty(&pci_devices)))
|
if (unlikely(no_pci_devices()))
|
||||||
return NULL;
|
return NULL;
|
||||||
down_read(&pci_bus_sem);
|
down_read(&pci_bus_sem);
|
||||||
n = from ? from->global_list.next : pci_devices.next;
|
n = from ? from->global_list.next : pci_devices.next;
|
||||||
@ -277,7 +277,7 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
|
|||||||
* can cause some machines to crash. So here we detect and flag that
|
* can cause some machines to crash. So here we detect and flag that
|
||||||
* situation and bail out early.
|
* situation and bail out early.
|
||||||
*/
|
*/
|
||||||
if (unlikely(list_empty(&pci_devices)))
|
if (unlikely(no_pci_devices()))
|
||||||
return NULL;
|
return NULL;
|
||||||
down_read(&pci_bus_sem);
|
down_read(&pci_bus_sem);
|
||||||
n = from ? from->global_list.next : pci_devices.next;
|
n = from ? from->global_list.next : pci_devices.next;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user