From: Axel Lin Date: Thu, 25 Sep 2014 02:17:29 +0000 (+0800) Subject: regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a642509801116037720892efe72f0e84f02f317;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro Current code does not take the macro parameter, fix it. This is not a problem at this moment because the only user actually passes vreg to FORCE_MODE_IS_2_BITS(). Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c index 8d5969a8e874..b55cd5b50ebe 100644 --- a/drivers/regulator/qcom_rpm-regulator.c +++ b/drivers/regulator/qcom_rpm-regulator.c @@ -50,7 +50,7 @@ struct rpm_reg_parts { }; #define FORCE_MODE_IS_2_BITS(reg) \ - ((vreg->parts->fm.mask >> vreg->parts->fm.shift) == 3) + (((reg)->parts->fm.mask >> (reg)->parts->fm.shift) == 3) struct qcom_rpm_reg { struct qcom_rpm *rpm;