Commit 0cf948aa authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Bjorn Helgaas

PCI/sysfs: Use default_groups in kobj_type for slot attrs

There are currently two ways to create a set of sysfs files for a
kobj_type: through the default_attrs field, and the default_groups field.
Move the PCI slot code to use the default_groups field which has been the
preferred way since aa30f47c ("kobject: Add support for default
attribute groups to kobj_type") so that we can soon get rid of the obsolete
default_attrs field.

Link: https://lore.kernel.org/r/20211228135722.381023-1-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 877fee2a
...@@ -96,11 +96,12 @@ static struct attribute *pci_slot_default_attrs[] = { ...@@ -96,11 +96,12 @@ static struct attribute *pci_slot_default_attrs[] = {
&pci_slot_attr_cur_speed.attr, &pci_slot_attr_cur_speed.attr,
NULL, NULL,
}; };
ATTRIBUTE_GROUPS(pci_slot_default);
static struct kobj_type pci_slot_ktype = { static struct kobj_type pci_slot_ktype = {
.sysfs_ops = &pci_slot_sysfs_ops, .sysfs_ops = &pci_slot_sysfs_ops,
.release = &pci_slot_release, .release = &pci_slot_release,
.default_attrs = pci_slot_default_attrs, .default_groups = pci_slot_default_groups,
}; };
static char *make_slot_name(const char *name) static char *make_slot_name(const char *name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment