diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-05-05 19:05:22 +0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-05-08 20:40:13 +0400 |
commit | c1a01a0360f6744c9c1735e5db7b208df819156e (patch) | |
tree | a280df6822fa374afada51b67408a3ce5952b7b6 /arch | |
parent | efdf811d82b8001781087fd9174bb90a9530e578 (diff) | |
download | linux-c1a01a0360f6744c9c1735e5db7b208df819156e.tar.xz |
ARM: mvebu: fix thermal quirk SoC revision check
In commit 54fe26a900bc528f3df1e4235cb6b9ca5c6d4dc2 ('ARM: mvebu: Add
thermal quirk for the Armada 375 DB board'), a check on the Armada SoC
revision was added to decide whether a quirk for the thermal device
should be applied or not.
However, the quirk implementation has a bug: it assumes
mvebu_get_soc_id() returns true on success, but it returns
0. Therefore, the condition:
if (mvebu_get_soc_id(&dev, &rev) && rev > ARMADA_375_Z1_REV)
is always false (as long as mvebu-soc-id is properly initialized). As
a consequence, the quirk is always applied, even on A0 steppings, for
which the quirk should not be applied.
This was spotted by testing the thermal driver on Armada 375 A0, which
Ezequiel could not do since he does not have access to the A0 revision
of the SoC for the moment.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1399302326-6917-2-git-send-email-thomas.petazzoni@free-electrons.com
Fixes: 54fe26a900bc528f3df1e4235cb6b9ca5c6d4dc2 ('ARM: mvebu: Add thermal quirk for the Armada 375 DB board')
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mvebu/board-v7.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index bc0283f0dd88..01cfce6ac20b 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c @@ -120,7 +120,7 @@ static void __init thermal_quirk(void) struct device_node *np; u32 dev, rev; - if (mvebu_get_soc_id(&dev, &rev) && rev > ARMADA_375_Z1_REV) + if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV) return; for_each_compatible_node(np, NULL, "marvell,armada375-thermal") { |