x86/CPU/AMD: Use default_groups in kobj_type
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 10:35:37 +0000 (11:35 +0100)
committerBorislav Petkov <bp@suse.de>
Tue, 1 Feb 2022 11:41:24 +0000 (12:41 +0100)
commit7f99cb5e60392fc3494c610776e733b68784280c
treea31731b74e91c810972b13458df1e18a7814378d
parent26291c54e111ff6ba87a164d85d4a4e134b7315c
x86/CPU/AMD: 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 AMD mce 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>
Tested-by: Yazen Ghannam <yazen.ghannam@amd.com>
Link: https://lore.kernel.org/r/20220106103537.3663852-1-gregkh@linuxfoundation.org
arch/x86/kernel/cpu/mce/amd.c