summaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_pci_sysfs.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-04 12:24:01 +0100
committerBorislav Petkov <bp@suse.de>2022-01-23 20:01:29 +0100
commit625c6b55699777ece6b87235f579e2cfbde049ce (patch)
treea54146b57c4df4f1b128e834ae8087b11e4e3bd9 /drivers/edac/edac_pci_sysfs.c
parent11413893a0d0b19df976eb9a2b600ba56802db2f (diff)
downloadlinux-625c6b55699777ece6b87235f579e2cfbde049ce.tar.bz2
EDAC: Use default_groups in kobj_type
There are currently 2 ways to create a set of sysfs files for a kobj_type, through the default_attrs field, and the default_groups field. Move the edac sysfs code to use default_groups field which has been the preferred way since aa30f47cf666 ("kobject: Add support for default attribute groups to kobj_type") so that the obsolete default_attrs field can be removed soon. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220104112401.1067148-2-gregkh@linuxfoundation.org
Diffstat (limited to 'drivers/edac/edac_pci_sysfs.c')
-rw-r--r--drivers/edac/edac_pci_sysfs.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
index c041fb8f3ef2..888d5728ecef 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -135,17 +135,18 @@ INSTANCE_ATTR(pe_count, S_IRUGO, instance_pe_count_show, NULL);
INSTANCE_ATTR(npe_count, S_IRUGO, instance_npe_count_show, NULL);
/* pci instance attributes */
-static struct attribute *pci_instance_attr[] = {
+static struct attribute *pci_instance_attrs[] = {
&attr_instance_pe_count.attr,
&attr_instance_npe_count.attr,
NULL
};
+ATTRIBUTE_GROUPS(pci_instance);
/* the ktype for a pci instance */
static struct kobj_type ktype_pci_instance = {
.release = edac_pci_instance_release,
.sysfs_ops = &pci_instance_ops,
- .default_attrs = pci_instance_attr,
+ .default_groups = pci_instance_groups,
};
/*
@@ -292,7 +293,7 @@ EDAC_PCI_ATTR(pci_parity_count, S_IRUGO, edac_pci_int_show, NULL);
EDAC_PCI_ATTR(pci_nonparity_count, S_IRUGO, edac_pci_int_show, NULL);
/* Base Attributes of the memory ECC object */
-static struct attribute *edac_pci_attr[] = {
+static struct attribute *edac_pci_attrs[] = {
&edac_pci_attr_check_pci_errors.attr,
&edac_pci_attr_edac_pci_log_pe.attr,
&edac_pci_attr_edac_pci_log_npe.attr,
@@ -301,6 +302,7 @@ static struct attribute *edac_pci_attr[] = {
&edac_pci_attr_pci_nonparity_count.attr,
NULL,
};
+ATTRIBUTE_GROUPS(edac_pci);
/*
* edac_pci_release_main_kobj
@@ -327,7 +329,7 @@ static void edac_pci_release_main_kobj(struct kobject *kobj)
static struct kobj_type ktype_edac_pci_main_kobj = {
.release = edac_pci_release_main_kobj,
.sysfs_ops = &edac_pci_sysfs_ops,
- .default_attrs = edac_pci_attr,
+ .default_groups = edac_pci_groups,
};
/**