public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro
@ 2014-09-25  2:17 Axel Lin
  2014-09-26  8:28 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-09-25  2:17 UTC (permalink / raw)
  To: Mark Brown; +Cc: Bjorn Andersson, Liam Girdwood, linux-kernel@vger.kernel.org

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>
---
 drivers/regulator/qcom_rpm-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c
index 8d5969a..b55cd5b 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;
-- 
1.9.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-26  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25  2:17 [PATCH] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro Axel Lin
2014-09-26  8:28 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox