Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/umwait: move to use bus_get_dev_root()

Direct access to the struct bus_type dev_root pointer is going away soon
so replace that with a call to bus_get_dev_root() instead, which is what
it is there for.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lore.kernel.org/r/20230313182918.1312597-10-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+6 -2
+6 -2
arch/x86/kernel/cpu/umwait.c
··· 232 232 * Add umwait control interface. Ignore failure, so at least the 233 233 * default values are set up in case the machine manages to boot. 234 234 */ 235 - dev = cpu_subsys.dev_root; 236 - return sysfs_create_group(&dev->kobj, &umwait_attr_group); 235 + dev = bus_get_dev_root(&cpu_subsys); 236 + if (dev) { 237 + ret = sysfs_create_group(&dev->kobj, &umwait_attr_group); 238 + put_device(dev); 239 + } 240 + return ret; 237 241 } 238 242 device_initcall(umwait_init);