]> Pileus Git - ~andy/linux/commitdiff
PCI: convert bus code to use bus_groups
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Oct 2013 20:51:02 +0000 (14:51 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 7 Oct 2013 20:51:02 +0000 (14:51 -0600)
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
drivers/pci/pci-sysfs.c
drivers/pci/pci.h

index 98f7b9b89507e05a331cceacc8defad13e7d9534..e00f741431153e0a47c9ad2505b3f610f0de6d1b 100644 (file)
@@ -1317,7 +1317,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,
 };
index 7128cfdd64aa9d31c8628be30e7c65b33396dbfb..d8eb880bd1fce5971774a03719eb3be14e83f690 100644 (file)
@@ -302,10 +302,20 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
        }
        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
index 8a00c063d7bc67af7a3256fdd4a81c3d4d87f80b..607be58dd72859ab40384c49d0de8a84f49c24a7 100644 (file)
@@ -156,7 +156,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
 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[];
 
 
 /**