提交 924b08f3 编写于 作者: H Hidetoshi Seto 提交者: Greg Kroah-Hartman

PCI : remove too specialized __pci_enable_device for default resume

Original patch was posted as "PCI : Move pci_fixup_device and is_enabled".
This 1 of 3 patches does:

  - reverts small part of Inaky's patch
    (remove __pci_enable_device)
    This change will be recovered by 3rd patch.

  - temporarily remove pci_fixup_device.
    This change will be recovered by 2nd patch.
Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 07eddf3d
...@@ -325,7 +325,7 @@ static int pci_default_resume(struct pci_dev *pci_dev) ...@@ -325,7 +325,7 @@ static int pci_default_resume(struct pci_dev *pci_dev)
pci_restore_state(pci_dev); pci_restore_state(pci_dev);
/* if the device was enabled before suspend, reenable */ /* if the device was enabled before suspend, reenable */
if (atomic_read(&pci_dev->enable_cnt)) if (atomic_read(&pci_dev->enable_cnt))
retval = __pci_enable_device(pci_dev); retval = pci_enable_device(pci_dev);
/* if the device was busmaster before the suspend, make it busmaster again */ /* if the device was busmaster before the suspend, make it busmaster again */
if (pci_dev->is_busmaster) if (pci_dev->is_busmaster)
pci_set_master(pci_dev); pci_set_master(pci_dev);
......
...@@ -700,29 +700,6 @@ pci_enable_device_bars(struct pci_dev *dev, int bars) ...@@ -700,29 +700,6 @@ pci_enable_device_bars(struct pci_dev *dev, int bars)
return 0; return 0;
} }
/**
* __pci_enable_device - Initialize device before it's used by a driver.
* @dev: PCI device to be initialized
*
* Initialize device before it's used by a driver. Ask low-level code
* to enable I/O and memory. Wake up the device if it was suspended.
* Beware, this function can fail.
*
* Note this function is a backend and is not supposed to be called by
* normal code, use pci_enable_device() instead.
*/
int
__pci_enable_device(struct pci_dev *dev)
{
int err;
err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
if (err)
return err;
pci_fixup_device(pci_fixup_enable, dev);
return 0;
}
/** /**
* pci_enable_device - Initialize device before it's used by a driver. * pci_enable_device - Initialize device before it's used by a driver.
* @dev: PCI device to be initialized * @dev: PCI device to be initialized
......
/* Functions internal to the PCI core code */ /* Functions internal to the PCI core code */
extern int __must_check __pci_enable_device(struct pci_dev *);
extern int pci_uevent(struct device *dev, char **envp, int num_envp, extern int pci_uevent(struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size); char *buffer, int buffer_size);
extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册