mach-snapdragon: of_fixup: fix condition check in ft_board_setup()
authorCaleb Connolly <caleb.connolly@linaro.org>
Mon, 31 Mar 2025 10:43:18 +0000 (12:43 +0200)
committerCaleb Connolly <caleb.connolly@linaro.org>
Thu, 10 Apr 2025 13:43:10 +0000 (15:43 +0200)
commit602ceb0c9279e15f94e160c70d471da6c4300841
treeca376369a48ff6487981c19c1a5f4a00b8632770
parent5b233442afacde1aca2556c543b1cd8e22946690
mach-snapdragon: of_fixup: fix condition check in ft_board_setup()

The fdt_node_check_compatible() function returns 0 on success which is
pretty confusing, and we were using it wrong!

Invert the condition check and refactor things to be more readable.

Additionally, add the check for the RB1 which needs the same fixup as
the RB2.

Reported-by: Sam Day <me@samcday.com>
Fixes: e64503f1fcdf ("mach-snapdragon: implement ft_board_setup() for USB role selection")
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Tested-by: Sam Day <me@samcday.com>
Link: https://lore.kernel.org/r/20250331104327.321339-1-caleb.connolly@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
arch/arm/mach-snapdragon/of_fixup.c