aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pci-driver.c2
-rw-r--r--drivers/pci/pci-sysfs.c16
-rw-r--r--drivers/pci/pci.h2
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 98f7b9b89507..e00f74143115 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1317,7 +1317,7 @@ struct bus_type pci_bus_type = {
1317 .remove = pci_device_remove, 1317 .remove = pci_device_remove,
1318 .shutdown = pci_device_shutdown, 1318 .shutdown = pci_device_shutdown,
1319 .dev_attrs = pci_dev_attrs, 1319 .dev_attrs = pci_dev_attrs,
1320 .bus_attrs = pci_bus_attrs, 1320 .bus_groups = pci_bus_groups,
1321 .drv_attrs = pci_drv_attrs, 1321 .drv_attrs = pci_drv_attrs,
1322 .pm = PCI_PM_OPS_PTR, 1322 .pm = PCI_PM_OPS_PTR,
1323}; 1323};
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 7128cfdd64aa..d8eb880bd1fc 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -302,10 +302,20 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
302 } 302 }
303 return count; 303 return count;
304} 304}
305static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store);
305 306
306struct bus_attribute pci_bus_attrs[] = { 307struct attribute *pci_bus_attrs[] = {
307 __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store), 308 &bus_attr_rescan.attr,
308 __ATTR_NULL 309 NULL,
310};
311
312static const struct attribute_group pci_bus_group = {
313 .attrs = pci_bus_attrs,
314};
315
316const struct attribute_group *pci_bus_groups[] = {
317 &pci_bus_group,
318 NULL,
309}; 319};
310 320
311static ssize_t 321static ssize_t
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 8a00c063d7bc..607be58dd728 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -156,7 +156,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
156extern struct device_attribute pci_dev_attrs[]; 156extern struct device_attribute pci_dev_attrs[];
157extern const struct attribute_group *pcibus_groups[]; 157extern const struct attribute_group *pcibus_groups[];
158extern struct device_type pci_dev_type; 158extern struct device_type pci_dev_type;
159extern struct bus_attribute pci_bus_attrs[]; 159extern const struct attribute_group *pci_bus_groups[];
160 160
161 161
162/** 162/**