diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-10-30 11:49:09 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-01-01 13:03:25 -0700 |
commit | a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c (patch) | |
tree | 62d061939000c65d91cf760a51509d388270f4c9 /arch/powerpc/platforms/512x/mpc5121_generic.c | |
parent | 73930a85cf38d72851305fcf640c07b4c13aa405 (diff) | |
download | kernel_samsung_smdk4412-a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c.zip kernel_samsung_smdk4412-a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c.tar.gz kernel_samsung_smdk4412-a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c.tar.bz2 |
of/flattree: Add of_flat_dt_match() helper function
This patch adds of_flat_dt_match() which tests a node for
compatibility with a list of values and converts the relevant powerpc
platform code to use it. This approach simplifies the board support
code a bit.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Diffstat (limited to 'arch/powerpc/platforms/512x/mpc5121_generic.c')
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_generic.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c index e487eb0..926731f 100644 --- a/arch/powerpc/platforms/512x/mpc5121_generic.c +++ b/arch/powerpc/platforms/512x/mpc5121_generic.c @@ -26,7 +26,7 @@ /* * list of supported boards */ -static char *board[] __initdata = { +static const char *board[] __initdata = { "prt,prtlvt", NULL }; @@ -36,16 +36,7 @@ static char *board[] __initdata = { */ static int __init mpc5121_generic_probe(void) { - unsigned long node = of_get_flat_dt_root(); - int i = 0; - - while (board[i]) { - if (of_flat_dt_is_compatible(node, board[i])) - break; - i++; - } - - return board[i] != NULL; + return of_flat_dt_match(of_get_flat_dt_root(), board); } define_machine(mpc5121_generic) { |