aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/livepatch
diff options
context:
space:
mode:
authorKimberly Brown <kimbrownkd@gmail.com>2019-04-01 22:51:58 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-25 22:06:11 +0200
commit70283454c918f1d65de0ec50c45ef592d781bcae (patch)
tree0b91b15729dc3e37c1e44c5c0d25262828734e7a /kernel/livepatch
parentcpufreq: schedutil: Replace default_attrs field with groups (diff)
downloadlinux-dev-70283454c918f1d65de0ec50c45ef592d781bcae.tar.xz
linux-dev-70283454c918f1d65de0ec50c45ef592d781bcae.zip
livepatch: Replace klp_ktype_patch's default_attrs with groups
The kobj_type default_attrs field is being replaced by the default_groups field. Replace klp_ktype_patch's default_attrs field with default_groups and use the ATTRIBUTE_GROUPS macro to create klp_patch_groups. This patch was tested by loading the livepatch-sample module and verifying that the sysfs files for the attributes in the default groups were created. Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Miroslav Benes <mbenes@suse.cz> Acked-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/livepatch')
-rw-r--r--kernel/livepatch/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index eb0ee10a1981..34a8338657d2 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -419,6 +419,7 @@ static struct attribute *klp_patch_attrs[] = {
&force_kobj_attr.attr,
NULL
};
+ATTRIBUTE_GROUPS(klp_patch);
static void klp_free_object_dynamic(struct klp_object *obj)
{
@@ -546,7 +547,7 @@ static void klp_kobj_release_patch(struct kobject *kobj)
static struct kobj_type klp_ktype_patch = {
.release = klp_kobj_release_patch,
.sysfs_ops = &kobj_sysfs_ops,
- .default_attrs = klp_patch_attrs,
+ .default_groups = klp_patch_groups,
};
static void klp_kobj_release_object(struct kobject *kobj)