spmi: pmic-arb: Always allocate ppid_to_apid table
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 27 Jun 2017 02:17:46 +0000 (19:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 13:00:47 +0000 (15:00 +0200)
commiteba9718ed25b2f8a3c066bf985edd5046485a018
tree0b33424797c6bdefb02e846490518004e9d37664
parent6b71016e4b253172545e8388ff646f0dcbda18a8
spmi: pmic-arb: Always allocate ppid_to_apid table

After commit 7f1d4e58dabb ("spmi: pmic-arb: optimize table
lookups") we always need the ppid_to_apid table regardless of the
version of pmic arbiter we have. Otherwise, we will try to deref
the array when we don't allocate it on v2 hardware like the
msm8974 SoCs.

Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Cc: Kiran Gunda <kgunda@codeaurora.org>
Fixes: 7f1d4e58dabb ("spmi: pmic-arb: optimize table lookups")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spmi/spmi-pmic-arb.c