diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index e9a8706a6401..cd8e682c04aa 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -148,7 +148,7 @@ static ssize_t is_enabled_store(struct device *dev, | |||
148 | return -EPERM; | 148 | return -EPERM; |
149 | 149 | ||
150 | if (!val) { | 150 | if (!val) { |
151 | if (atomic_read(&pdev->enable_cnt) != 0) | 151 | if (pci_is_enabled(pdev)) |
152 | pci_disable_device(pdev); | 152 | pci_disable_device(pdev); |
153 | else | 153 | else |
154 | result = -EIO; | 154 | result = -EIO; |