of: Reimplement of_machine_is_compatible() using of_machine_compatible_match()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 14 Dec 2023 10:31:50 +0000 (21:31 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Mar 2024 11:20:29 +0000 (22:20 +1100)
commit1ac8205f907517a306b661212496fedce79d7cc5
tree0a5bb5238b154f06be8fcd282c04e8f69d159f27
parentcefdb366dcbe97908b6055595a15bf7689556bf8
of: Reimplement of_machine_is_compatible() using of_machine_compatible_match()

of_machine_compatible_match() works with a table of strings.
of_machine_is_compatible() is a simplier version with only one string.

Re-implement of_machine_is_compatible() by setting a table of strings
with a single string then using of_machine_compatible_match().

Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231214103152.12269-3-mpe@ellerman.id.au
drivers/of/base.c
include/linux/of.h