diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-driver.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 23 | ||||
-rw-r--r-- | drivers/pci/pci.h | 1 |
3 files changed, 1 insertions, 25 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 92d5e8db0de7..1ec546d3d53c 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -325,7 +325,7 @@ static int pci_default_resume(struct pci_dev *pci_dev) | |||
325 | pci_restore_state(pci_dev); | 325 | pci_restore_state(pci_dev); |
326 | /* if the device was enabled before suspend, reenable */ | 326 | /* if the device was enabled before suspend, reenable */ |
327 | if (atomic_read(&pci_dev->enable_cnt)) | 327 | if (atomic_read(&pci_dev->enable_cnt)) |
328 | retval = __pci_enable_device(pci_dev); | 328 | retval = pci_enable_device(pci_dev); |
329 | /* if the device was busmaster before the suspend, make it busmaster again */ | 329 | /* if the device was busmaster before the suspend, make it busmaster again */ |
330 | if (pci_dev->is_busmaster) | 330 | if (pci_dev->is_busmaster) |
331 | pci_set_master(pci_dev); | 331 | pci_set_master(pci_dev); |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 206c834d263a..d20d3983bbd6 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -701,29 +701,6 @@ pci_enable_device_bars(struct pci_dev *dev, int bars) | |||
701 | } | 701 | } |
702 | 702 | ||
703 | /** | 703 | /** |
704 | * __pci_enable_device - Initialize device before it's used by a driver. | ||
705 | * @dev: PCI device to be initialized | ||
706 | * | ||
707 | * Initialize device before it's used by a driver. Ask low-level code | ||
708 | * to enable I/O and memory. Wake up the device if it was suspended. | ||
709 | * Beware, this function can fail. | ||
710 | * | ||
711 | * Note this function is a backend and is not supposed to be called by | ||
712 | * normal code, use pci_enable_device() instead. | ||
713 | */ | ||
714 | int | ||
715 | __pci_enable_device(struct pci_dev *dev) | ||
716 | { | ||
717 | int err; | ||
718 | |||
719 | err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1); | ||
720 | if (err) | ||
721 | return err; | ||
722 | pci_fixup_device(pci_fixup_enable, dev); | ||
723 | return 0; | ||
724 | } | ||
725 | |||
726 | /** | ||
727 | * pci_enable_device - Initialize device before it's used by a driver. | 704 | * pci_enable_device - Initialize device before it's used by a driver. |
728 | * @dev: PCI device to be initialized | 705 | * @dev: PCI device to be initialized |
729 | * | 706 | * |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 398852f526a6..6bf327db5c5e 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -1,6 +1,5 @@ | |||
1 | /* Functions internal to the PCI core code */ | 1 | /* Functions internal to the PCI core code */ |
2 | 2 | ||
3 | extern int __must_check __pci_enable_device(struct pci_dev *); | ||
4 | extern int pci_uevent(struct device *dev, char **envp, int num_envp, | 3 | extern int pci_uevent(struct device *dev, char **envp, int num_envp, |
5 | char *buffer, int buffer_size); | 4 | char *buffer, int buffer_size); |
6 | extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); | 5 | extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); |