Skip to content

Commit 0cf948a

Browse files
gregkhbjorn-helgaas
authored andcommitted
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 aa30f47 ("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.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 877fee2 commit 0cf948a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/pci/slot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ static struct attribute *pci_slot_default_attrs[] = {
9696
&pci_slot_attr_cur_speed.attr,
9797
NULL,
9898
};
99+
ATTRIBUTE_GROUPS(pci_slot_default);
99100

100101
static struct kobj_type pci_slot_ktype = {
101102
.sysfs_ops = &pci_slot_sysfs_ops,
102103
.release = &pci_slot_release,
103-
.default_attrs = pci_slot_default_attrs,
104+
.default_groups = pci_slot_default_groups,
104105
};
105106

106107
static char *make_slot_name(const char *name)

0 commit comments

Comments
 (0)