summaryrefslogtreecommitdiff
path: root/drivers/pci/slot.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-28 16:57:22 +0300
committerBjorn Helgaas <bhelgaas@google.com>2021-12-29 22:42:04 +0300
commit0cf948aab9a0049456d9a498af3da6b403e2a0ed (patch)
tree78bcbb3c521fb49149568807b171a791dfc888ba /drivers/pci/slot.c
parent877fee2a0c65a3b0b6ac0e90d7d7718b5a0341d3 (diff)
downloadlinux-0cf948aab9a0049456d9a498af3da6b403e2a0ed.tar.xz
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 aa30f47cf666 ("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>
Diffstat (limited to 'drivers/pci/slot.c')
-rw-r--r--drivers/pci/slot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c
index 751a26668e3a..a0c67191a8b9 100644
--- a/drivers/pci/slot.c
+++ b/drivers/pci/slot.c
@@ -96,11 +96,12 @@ static struct attribute *pci_slot_default_attrs[] = {
&pci_slot_attr_cur_speed.attr,
NULL,
};
+ATTRIBUTE_GROUPS(pci_slot_default);
static struct kobj_type pci_slot_ktype = {
.sysfs_ops = &pci_slot_sysfs_ops,
.release = &pci_slot_release,
- .default_attrs = pci_slot_default_attrs,
+ .default_groups = pci_slot_default_groups,
};
static char *make_slot_name(const char *name)