From a5969cabbb4660eab42b6ef0412cbbd1200cf14d Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Sat, 12 Oct 2024 07:10:09 +0000 Subject: [PATCH] 修改led为gpio --- kernel/samples/kobject/kset-example.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/samples/kobject/kset-example.c b/kernel/samples/kobject/kset-example.c index 401328f..c8010f1 100644 --- a/kernel/samples/kobject/kset-example.c +++ b/kernel/samples/kobject/kset-example.c @@ -178,6 +178,7 @@ &bar_attribute.attr, NULL, /* need to NULL terminate the list of attributes */ }; +ATTRIBUTE_GROUPS(foo_default); /* * Our own ktype for our kobjects. Here we specify our sysfs ops, the @@ -187,7 +188,7 @@ static struct kobj_type foo_ktype = { .sysfs_ops = &foo_sysfs_ops, .release = foo_release, - .default_attrs = foo_default_attrs, + .default_groups = foo_default_groups, }; static struct kset *example_kset; -- Gitblit v1.6.2