mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
md: use ATTRIBUTE_GROUPS() for md default sysfs attributes
Replace the md_default_group and md_attr_groups with ATTRIBUTE_GROUPS(). Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> Link: https://lore.kernel.org/linux-raid/20260423101303.48196-4-abd.masalkhi@gmail.com Signed-off-by: Yu Kuai <yukuai@fnnas.com>
This commit is contained in:
committed by
Yu Kuai
parent
408434a324
commit
3b2f70eab5
@@ -6055,10 +6055,7 @@ static struct attribute *md_default_attrs[] = {
|
||||
&md_logical_block_size.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct attribute_group md_default_group = {
|
||||
.attrs = md_default_attrs,
|
||||
};
|
||||
ATTRIBUTE_GROUPS(md_default);
|
||||
|
||||
static struct attribute *md_redundancy_attrs[] = {
|
||||
&md_scan_mode.attr,
|
||||
@@ -6083,11 +6080,6 @@ static const struct attribute_group md_redundancy_group = {
|
||||
.attrs = md_redundancy_attrs,
|
||||
};
|
||||
|
||||
static const struct attribute_group *md_attr_groups[] = {
|
||||
&md_default_group,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static ssize_t
|
||||
md_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
|
||||
{
|
||||
@@ -6170,7 +6162,7 @@ static const struct sysfs_ops md_sysfs_ops = {
|
||||
static const struct kobj_type md_ktype = {
|
||||
.release = md_kobj_release,
|
||||
.sysfs_ops = &md_sysfs_ops,
|
||||
.default_groups = md_attr_groups,
|
||||
.default_groups = md_default_groups,
|
||||
};
|
||||
|
||||
int mdp_major = 0;
|
||||
|
||||
Reference in New Issue
Block a user