Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b40b97ae authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

PCI: Remove CONFIG_HOTPLUG ifdefs



Remove conditional code based on CONFIG_HOTPLUG being false.  It's
always on now in preparation of it going away as an option.

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c610c12
Loading
Loading
Loading
Loading
+0 −15
Original line number Original line Diff line number Diff line
@@ -89,10 +89,6 @@ static void pci_free_dynids(struct pci_driver *drv)
	spin_unlock(&drv->dynids.lock);
	spin_unlock(&drv->dynids.lock);
}
}


/*
 * Dynamic device ID manipulation via sysfs is disabled for !CONFIG_HOTPLUG
 */
#ifdef CONFIG_HOTPLUG
/**
/**
 * store_new_id - sysfs frontend to pci_add_dynid()
 * store_new_id - sysfs frontend to pci_add_dynid()
 * @driver: target device driver
 * @driver: target device driver
@@ -191,10 +187,6 @@ static struct driver_attribute pci_drv_attrs[] = {
	__ATTR_NULL,
	__ATTR_NULL,
};
};


#else
#define pci_drv_attrs	NULL
#endif /* CONFIG_HOTPLUG */

/**
/**
 * pci_match_id - See if a pci device matches a given pci_id table
 * pci_match_id - See if a pci device matches a given pci_id table
 * @ids: array of PCI device id structures to search in
 * @ids: array of PCI device id structures to search in
@@ -1223,13 +1215,6 @@ void pci_dev_put(struct pci_dev *dev)
		put_device(&dev->dev);
		put_device(&dev->dev);
}
}


#ifndef CONFIG_HOTPLUG
int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
{
	return -ENODEV;
}
#endif

struct bus_type pci_bus_type = {
struct bus_type pci_bus_type = {
	.name		= "pci",
	.name		= "pci",
	.match		= pci_bus_match,
	.match		= pci_bus_match,
+0 −7
Original line number Original line Diff line number Diff line
@@ -284,7 +284,6 @@ msi_bus_store(struct device *dev, struct device_attribute *attr,
	return count;
	return count;
}
}


#ifdef CONFIG_HOTPLUG
static DEFINE_MUTEX(pci_remove_rescan_mutex);
static DEFINE_MUTEX(pci_remove_rescan_mutex);
static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
				size_t count)
				size_t count)
@@ -377,8 +376,6 @@ dev_bus_rescan_store(struct device *dev, struct device_attribute *attr,
	return count;
	return count;
}
}


#endif

#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
static ssize_t d3cold_allowed_store(struct device *dev,
static ssize_t d3cold_allowed_store(struct device *dev,
				    struct device_attribute *attr,
				    struct device_attribute *attr,
@@ -424,10 +421,8 @@ struct device_attribute pci_dev_attrs[] = {
	__ATTR(broken_parity_status,(S_IRUGO|S_IWUSR),
	__ATTR(broken_parity_status,(S_IRUGO|S_IWUSR),
		broken_parity_status_show,broken_parity_status_store),
		broken_parity_status_show,broken_parity_status_store),
	__ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store),
	__ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store),
#ifdef CONFIG_HOTPLUG
	__ATTR(remove, (S_IWUSR|S_IWGRP), NULL, remove_store),
	__ATTR(remove, (S_IWUSR|S_IWGRP), NULL, remove_store),
	__ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_rescan_store),
	__ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_rescan_store),
#endif
#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
	__ATTR(d3cold_allowed, 0644, d3cold_allowed_show, d3cold_allowed_store),
	__ATTR(d3cold_allowed, 0644, d3cold_allowed_show, d3cold_allowed_store),
#endif
#endif
@@ -435,9 +430,7 @@ struct device_attribute pci_dev_attrs[] = {
};
};


struct device_attribute pcibus_dev_attrs[] = {
struct device_attribute pcibus_dev_attrs[] = {
#ifdef CONFIG_HOTPLUG
	__ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store),
	__ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store),
#endif
	__ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpumaskaffinity, NULL),
	__ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpumaskaffinity, NULL),
	__ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL),
	__ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL),
	__ATTR_NULL,
	__ATTR_NULL,
+0 −4
Original line number Original line Diff line number Diff line
@@ -159,11 +159,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
}
}
extern struct device_attribute pci_dev_attrs[];
extern struct device_attribute pci_dev_attrs[];
extern struct device_attribute pcibus_dev_attrs[];
extern struct device_attribute pcibus_dev_attrs[];
#ifdef CONFIG_HOTPLUG
extern struct bus_attribute pci_bus_attrs[];
extern struct bus_attribute pci_bus_attrs[];
#else
#define pci_bus_attrs	NULL
#endif




/**
/**
+0 −2
Original line number Original line Diff line number Diff line
@@ -1864,7 +1864,6 @@ struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops,
}
}
EXPORT_SYMBOL(pci_scan_bus);
EXPORT_SYMBOL(pci_scan_bus);


#ifdef CONFIG_HOTPLUG
/**
/**
 * pci_rescan_bus_bridge_resize - scan a PCI bus for devices.
 * pci_rescan_bus_bridge_resize - scan a PCI bus for devices.
 * @bridge: PCI bridge for the bus to scan
 * @bridge: PCI bridge for the bus to scan
@@ -1894,7 +1893,6 @@ EXPORT_SYMBOL(pci_add_new_bus);
EXPORT_SYMBOL(pci_scan_slot);
EXPORT_SYMBOL(pci_scan_slot);
EXPORT_SYMBOL(pci_scan_bridge);
EXPORT_SYMBOL(pci_scan_bridge);
EXPORT_SYMBOL_GPL(pci_scan_child_bus);
EXPORT_SYMBOL_GPL(pci_scan_child_bus);
#endif


static int __init pci_sort_bf_cmp(const struct device *d_a, const struct device *d_b)
static int __init pci_sort_bf_cmp(const struct device *d_a, const struct device *d_b)
{
{
+0 −2
Original line number Original line Diff line number Diff line
@@ -941,10 +941,8 @@ void set_pcie_hotplug_bridge(struct pci_dev *pdev);


/* Functions for PCI Hotplug drivers to use */
/* Functions for PCI Hotplug drivers to use */
int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap);
int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap);
#ifdef CONFIG_HOTPLUG
unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge);
unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge);
unsigned int pci_rescan_bus(struct pci_bus *bus);
unsigned int pci_rescan_bus(struct pci_bus *bus);
#endif


/* Vital product data routines */
/* Vital product data routines */
ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf);
ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf);