From: Saurabh Sengar <saurabh.truth@gmail.com>
To: l.majewski@samsung.com, rui.zhang@intel.com, edubezval@gmail.com,
kgene@kernel.org, k.kozlowski@samsung.com,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Saurabh Sengar <saurabh.truth@gmail.com>
Subject: [PATCH] thermal: exynos: use of_property_read_u8()
Date: Mon, 23 Nov 2015 19:40:41 +0530 [thread overview]
Message-ID: <1448287841-4816-1-git-send-email-saurabh.truth@gmail.com> (raw)
use of_property_read_u8() for u8 variables,
also changed the return type to void as this function return type
is nowhere used.
Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
drivers/thermal/samsung/exynos_tmu.c | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index fa61eff..b692c95 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1128,20 +1128,16 @@ static int exynos_of_get_soc_type(struct device_node *np)
return -EINVAL;
}
-static int exynos_of_sensor_conf(struct device_node *np,
+static void exynos_of_sensor_conf(struct device_node *np,
struct exynos_tmu_platform_data *pdata)
{
- u32 value;
- int ret;
-
of_node_get(np);
- ret = of_property_read_u32(np, "samsung,tmu_gain", &value);
- pdata->gain = (u8)value;
- of_property_read_u32(np, "samsung,tmu_reference_voltage", &value);
- pdata->reference_voltage = (u8)value;
- of_property_read_u32(np, "samsung,tmu_noise_cancel_mode", &value);
- pdata->noise_cancel_mode = (u8)value;
+ of_property_read_u8(np, "samsung,tmu_gain", &pdata->gain);
+ of_property_read_u8(np, "samsung,tmu_reference_voltage",
+ &pdata->reference_voltage);
+ of_property_read_u8(np, "samsung,tmu_noise_cancel_mode",
+ &pdata->noise_cancel_mode);
of_property_read_u32(np, "samsung,tmu_efuse_value",
&pdata->efuse_value);
@@ -1150,18 +1146,18 @@ static int exynos_of_sensor_conf(struct device_node *np,
of_property_read_u32(np, "samsung,tmu_max_efuse_value",
&pdata->max_efuse_value);
- of_property_read_u32(np, "samsung,tmu_first_point_trim", &value);
- pdata->first_point_trim = (u8)value;
- of_property_read_u32(np, "samsung,tmu_second_point_trim", &value);
- pdata->second_point_trim = (u8)value;
- of_property_read_u32(np, "samsung,tmu_default_temp_offset", &value);
- pdata->default_temp_offset = (u8)value;
+ of_property_read_u8(np, "samsung,tmu_first_point_trim",
+ &pdata->first_point_trim);
+ of_property_read_u8(np, "samsung,tmu_second_point_trim",
+ &pdata->second_point_trim);
+ of_property_read_u8(np, "samsung,tmu_default_temp_offset",
+ &pdata->default_temp_offset);
of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
of_property_read_u32(np, "samsung,tmu_cal_mode", &pdata->cal_mode);
of_node_put(np);
- return 0;
+ return;
}
static int exynos_map_dt_data(struct platform_device *pdev)
--
1.9.1
next reply other threads:[~2015-11-23 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 14:10 Saurabh Sengar [this message]
2015-11-23 23:29 ` Eduardo Valentin
2015-11-24 1:28 ` Krzysztof Kozlowski
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=1448287841-4816-1-git-send-email-saurabh.truth@gmail.com \
--to=saurabh.truth@gmail.com \
--cc=edubezval@gmail.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=l.majewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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®