]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: generic: Fix machine compatible matching
authorJames Hogan <jhogan@kernel.org>
Fri, 2 Feb 2018 22:14:09 +0000 (22:14 +0000)
committerJames Hogan <jhogan@kernel.org>
Mon, 5 Feb 2018 10:37:48 +0000 (10:37 +0000)
commite437995e7167f0c6117df04a9e0603fc01cbd640
treeaf2f5f4b552b1db863e612c6dca9f01022603465
parent376210edaabb44f28b3f64dfb9ccceb4cb2d89ae
MIPS: generic: Fix machine compatible matching

We now have a platform (Ranchu) in the "generic" platform which matches
based on the FDT compatible string using mips_machine_is_compatible(),
however that function doesn't stop at a blank struct
of_device_id::compatible as that is an array in the struct, not a
pointer to a string.

Fix the loop completion to check the first byte of the compatible array
rather than the address of the compatible array in the struct.

Fixes: f34acf02b34f ("MIPS: generic: Introduce generic DT-based board support")
Signed-off-by: James Hogan <jhogan@kernel.org>
Reviewed-by: Paul Burton <paul.burton@mips.com>
Reviewed-by: Matt Redfearn <matt.redfearn@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18580/
arch/mips/include/asm/machine.h