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

soc: sunxi: mbus: don't access of_root directly

Don't access of_root directly as it reduces the build test coverage for
this driver with COMPILE_TEST=y and OF=n. Use existing helper functions
to retrieve the relevant information.

Suggested-by: Rob Herring <robh@kernel.org>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260223-soc-of-root-v2-9-b45da45903c8@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Bartosz Golaszewski and committed by
Greg Kroah-Hartman
15949f15 01898f5e

+1 -1
+1 -1
drivers/soc/sunxi/sunxi_mbus.c
··· 118 118 119 119 static int __init sunxi_mbus_init(void) 120 120 { 121 - if (!of_device_compatible_match(of_root, sunxi_mbus_platforms)) 121 + if (!of_machine_compatible_match(sunxi_mbus_platforms)) 122 122 return 0; 123 123 124 124 bus_register_notifier(&platform_bus_type, &sunxi_mbus_nb);