diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 14:22:10 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 14:22:10 -0700 |
| commit | cba9545b635d1566060d5a8f1a9dc78680f4e839 (patch) | |
| tree | aeec00e82328c58b7ab25333f130524bd5df1c50 /pci-convert-bus-code-to-use-drv_groups.patch | |
| parent | f2fea6a31b09a12fe4d9e9e3f9a8e2be017ad611 (diff) | |
| download | patches-cba9545b635d1566060d5a8f1a9dc78680f4e839.tar.gz | |
more updates
Diffstat (limited to 'pci-convert-bus-code-to-use-drv_groups.patch')
| -rw-r--r-- | pci-convert-bus-code-to-use-drv_groups.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/pci-convert-bus-code-to-use-drv_groups.patch b/pci-convert-bus-code-to-use-drv_groups.patch new file mode 100644 index 00000000000000..c42118ea82447d --- /dev/null +++ b/pci-convert-bus-code-to-use-drv_groups.patch @@ -0,0 +1,54 @@ +From foo@baz Fri Aug 23 13:59:52 PDT 2013 +Date: Fri, 23 Aug 2013 13:59:52 -0700 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: 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> +--- + drivers/pci/pci-driver.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/drivers/pci/pci-driver.c ++++ b/drivers/pci/pci-driver.c +@@ -135,6 +135,7 @@ store_new_id(struct device_driver *drive + 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 *dr + 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 +@@ -1275,7 +1278,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, + }; + |
