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.

arm64: cpufeature: 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: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Kristina Martsenko <kristina.martsenko@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Vladimir Murzin <vladimir.murzin@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20230313182918.1312597-11-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+9 -1
+9 -1
arch/arm64/kernel/cpufeature.c
··· 1490 1490 1491 1491 static int __init aarch32_el0_sysfs_init(void) 1492 1492 { 1493 + struct device *dev_root; 1494 + int ret = 0; 1495 + 1493 1496 if (!allow_mismatched_32bit_el0) 1494 1497 return 0; 1495 1498 1496 - return device_create_file(cpu_subsys.dev_root, &dev_attr_aarch32_el0); 1499 + dev_root = bus_get_dev_root(&cpu_subsys); 1500 + if (dev_root) { 1501 + ret = device_create_file(dev_root, &dev_attr_aarch32_el0); 1502 + put_device(dev_root); 1503 + } 1504 + return ret; 1497 1505 } 1498 1506 device_initcall(aarch32_el0_sysfs_init); 1499 1507