diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-07 14:51:20 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-10-07 14:51:20 -0600 |
commit | 2229c1fbc5bd3bd7eb376285de159d086e79d58a (patch) | |
tree | aea7651eb7fc0aa9e465913f1b399ce2f55fa9e4 /drivers/pci/pci-driver.c | |
parent | 0f49ba5599048aae2fb3479a1814736e969cf38c (diff) | |
download | linux-stable-2229c1fbc5bd3bd7eb376285de159d086e79d58a.tar.gz linux-stable-2229c1fbc5bd3bd7eb376285de159d086e79d58a.tar.bz2 linux-stable-2229c1fbc5bd3bd7eb376285de159d086e79d58a.zip |
PCI: convert bus code to use drv_groups
The drv_attrs field of struct bus_type is going away soon, drv_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>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index e00f74143115..38f3c0140dfb 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -135,6 +135,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) return retval; return count; } +static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id); /** * store_remove_id - remove a PCI device ID from this driver @@ -180,12 +181,14 @@ store_remove_id(struct device_driver *driver, const char *buf, size_t count) return retval; return count; } +static DRIVER_ATTR(remove_id, S_IWUSR, NULL, store_remove_id); -static struct driver_attribute pci_drv_attrs[] = { - __ATTR(new_id, S_IWUSR, NULL, store_new_id), - __ATTR(remove_id, S_IWUSR, NULL, store_remove_id), - __ATTR_NULL, +static struct attribute *pci_drv_attrs[] = { + &driver_attr_new_id.attr, + &driver_attr_remove_id.attr, + NULL, }; +ATTRIBUTE_GROUPS(pci_drv); /** * pci_match_id - See if a pci device matches a given pci_id table @@ -1318,7 +1321,7 @@ struct bus_type pci_bus_type = { .shutdown = pci_device_shutdown, .dev_attrs = pci_dev_attrs, .bus_groups = pci_bus_groups, - .drv_attrs = pci_drv_attrs, + .drv_groups = pci_drv_groups, .pm = PCI_PM_OPS_PTR, }; |