/* Note we don't actually disable the device until all callers of pci_device_enable() have called pci_device_disable().  */
void pci_disable_device(struct pci_dev *dev)
/* Note we don't actually disable the device until all callers of pci_device_enable() have called pci_device_disable().  */
void pci_disable_device(struct pci_dev *dev)
{
	struct pci_devres *dr;
	dr = find_pci_dr(dev);
	if (dr)
		dr->enabled = 0;
	if (atomic_sub_return(1, &dev->enable_cnt) != 0)
		return;
	do_pci_disable_device(dev);
	dev->is_busmaster = 0;
}