]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro
authorAxel Lin <axel.lin@ingics.com>
Thu, 25 Sep 2014 02:17:29 +0000 (10:17 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 26 Sep 2014 08:28:40 +0000 (09:28 +0100)
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_rpm-regulator.c

index 8d5969a8e874888849759cdb505441784dd71791..b55cd5b50ebe546da8c6b096a93e06c5e772e218 100644 (file)
@@ -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;