diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 13:25:27 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 13:25:27 -0700 |
| commit | f2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611 (patch) | |
| tree | c16afc7b5e4b92cb361c6d2b3ec6f0e9a780a476 /pci-convert-bus-code-to-use-bus_groups.patch | |
| parent | e930b8544abee8d7894d5f55af16cb5e7be25f9f (diff) | |
| download | patches-f2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611.tar.gz | |
updates
Diffstat (limited to 'pci-convert-bus-code-to-use-bus_groups.patch')
| -rw-r--r-- | pci-convert-bus-code-to-use-bus_groups.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/pci-convert-bus-code-to-use-bus_groups.patch b/pci-convert-bus-code-to-use-bus_groups.patch new file mode 100644 index 00000000000000..7a3e0478564f9d --- /dev/null +++ b/pci-convert-bus-code-to-use-bus_groups.patch @@ -0,0 +1,66 @@ +From foo@baz Fri Aug 23 13:13:27 PDT 2013 +Date: Fri, 23 Aug 2013 13:13:27 -0700 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: PCI: convert bus code to use bus_groups + +The bus_attrs field of struct bus_type is going away soon, dev_groups +should be used instead. This converts the PCI bus code to use the +correct field. + +Cc: Bjorn Helgaas <bhelgaas@google.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/pci/pci-driver.c | 2 +- + drivers/pci/pci-sysfs.c | 16 +++++++++++++--- + drivers/pci/pci.h | 2 +- + 3 files changed, 15 insertions(+), 5 deletions(-) + +--- a/drivers/pci/pci-driver.c ++++ b/drivers/pci/pci-driver.c +@@ -1274,7 +1274,7 @@ struct bus_type pci_bus_type = { + .remove = pci_device_remove, + .shutdown = pci_device_shutdown, + .dev_attrs = pci_dev_attrs, +- .bus_attrs = pci_bus_attrs, ++ .bus_groups = pci_bus_groups, + .drv_attrs = pci_drv_attrs, + .pm = PCI_PM_OPS_PTR, + }; +--- a/drivers/pci/pci-sysfs.c ++++ b/drivers/pci/pci-sysfs.c +@@ -302,10 +302,20 @@ static ssize_t bus_rescan_store(struct b + } + return count; + } ++static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store); + +-struct bus_attribute pci_bus_attrs[] = { +- __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store), +- __ATTR_NULL ++struct attribute *pci_bus_attrs[] = { ++ &bus_attr_rescan.attr, ++ NULL, ++}; ++ ++static const struct attribute_group pci_bus_group = { ++ .attrs = pci_bus_attrs, ++}; ++ ++const struct attribute_group *pci_bus_groups[] = { ++ &pci_bus_group, ++ NULL, + }; + + static ssize_t +--- a/drivers/pci/pci.h ++++ b/drivers/pci/pci.h +@@ -153,7 +153,7 @@ static inline int pci_no_d1d2(struct pci + extern struct device_attribute pci_dev_attrs[]; + extern const struct attribute_group *pcibus_groups[]; + extern struct device_type pci_dev_type; +-extern struct bus_attribute pci_bus_attrs[]; ++extern const struct attribute_group *pci_bus_groups[]; + + + /** |
