[PATCH v2 3/3] PCI: Hotplug: use new pci function to get device addition state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Due to one race condition happening while updating pci
device addition and master status bits in a particular
scenario, device addition state is moved to a independent
private flag variable.

This change uses newly proposed pci_dev_is_added() function
to retrieve device addition state.

Signed-off-by: Hari Vyas <hari.vyas@xxxxxxxxxxxx>
---
 drivers/pci/hotplug/acpiphp_glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 3a17b29..ef0b1b6 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -509,7 +509,7 @@ static void enable_slot(struct acpiphp_slot *slot)
 
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		/* Assume that newly added devices are powered on already. */
-		if (!dev->is_added)
+		if (!pci_dev_is_added(dev))
 			dev->current_state = PCI_D0;
 	}
 
-- 
1.9.1




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux