From: Yangtao Li <frank.li@vivo.com>
To: anarsoul@gmail.com, tiny.windzz@gmail.com, rafael@kernel.org,
daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com,
wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
Yangtao Li <frank.li@vivo.com>
Subject: [PATCH] thermal: sun8i: convert to use macro
Date: Mon, 23 Jan 2023 18:23:19 +0800 [thread overview]
Message-ID: <20230123102319.37710-1-frank.li@vivo.com> (raw)
Use TEMP_CALIB_MASK macro instead of raw number.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/thermal/sun8i_thermal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index e64d06d1328c..497beac63e5d 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -210,7 +210,7 @@ static int sun8i_h3_ths_calibrate(struct ths_device *tmdev,
regmap_update_bits(tmdev->regmap,
SUN8I_THS_TEMP_CALIB + (4 * (i >> 1)),
- 0xfff << offset,
+ TEMP_CALIB_MASK << offset,
caldata[i] << offset);
}
@@ -271,7 +271,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
offset = (i % 2) * 16;
regmap_update_bits(tmdev->regmap,
SUN50I_H6_THS_TEMP_CALIB + (i / 2 * 4),
- 0xfff << offset,
+ TEMP_CALIB_MASK << offset,
cdata << offset);
}
--
2.25.1
next reply other threads:[~2023-01-23 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 10:23 Yangtao Li [this message]
2023-01-24 10:40 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230123102319.37710-1-frank.li@vivo.com \
--to=frank.li@vivo.com \
--cc=amitk@kernel.org \
--cc=anarsoul@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=samuel@sholland.org \
--cc=tiny.windzz@gmail.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®