mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
x86/platform/uv: 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 uv sysfs code to use default_groups field which has
been the preferred way since aa30f47cf6
("kobject: Add support for
default attribute groups to kobj_type") so that we can soon get rid of
the obsolete default_attrs field.
Cc: Justin Ernst <justin.ernst@hpe.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211229141332.2552428-1-gregkh@linuxfoundation.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
55fa3c9665
commit
afca4cbe3a
@ -175,6 +175,7 @@ static struct attribute *uv_hub_attrs[] = {
|
||||
&cnode_attribute.attr,
|
||||
NULL,
|
||||
};
|
||||
ATTRIBUTE_GROUPS(uv_hub);
|
||||
|
||||
static void hub_release(struct kobject *kobj)
|
||||
{
|
||||
@ -205,7 +206,7 @@ static const struct sysfs_ops hub_sysfs_ops = {
|
||||
static struct kobj_type hub_attr_type = {
|
||||
.release = hub_release,
|
||||
.sysfs_ops = &hub_sysfs_ops,
|
||||
.default_attrs = uv_hub_attrs,
|
||||
.default_groups = uv_hub_groups,
|
||||
};
|
||||
|
||||
static int uv_hubs_init(void)
|
||||
@ -327,6 +328,7 @@ static struct attribute *uv_port_attrs[] = {
|
||||
&uv_port_conn_port_attribute.attr,
|
||||
NULL,
|
||||
};
|
||||
ATTRIBUTE_GROUPS(uv_port);
|
||||
|
||||
static void uv_port_release(struct kobject *kobj)
|
||||
{
|
||||
@ -357,7 +359,7 @@ static const struct sysfs_ops uv_port_sysfs_ops = {
|
||||
static struct kobj_type uv_port_attr_type = {
|
||||
.release = uv_port_release,
|
||||
.sysfs_ops = &uv_port_sysfs_ops,
|
||||
.default_attrs = uv_port_attrs,
|
||||
.default_groups = uv_port_groups,
|
||||
};
|
||||
|
||||
static int uv_ports_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user