From patchwork Mon Nov 23 14:10:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: saurabh X-Patchwork-Id: 7682341 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5F07EBF90C for ; Mon, 23 Nov 2015 14:11:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80ED020412 for ; Mon, 23 Nov 2015 14:10:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E0CC2042A for ; Mon, 23 Nov 2015 14:10:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754412AbbKWOK5 (ORCPT ); Mon, 23 Nov 2015 09:10:57 -0500 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34296 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753743AbbKWOK5 (ORCPT ); Mon, 23 Nov 2015 09:10:57 -0500 Received: by pacfl14 with SMTP id fl14so27078732pac.1; Mon, 23 Nov 2015 06:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=2J9Y7v1X45gboJsgmhIoIUH1S7xIK1jqmVQmOsawzCA=; b=FHKEVB0Mz+7Pb+wUfp9dQ1bY4qzDjSC9hL8luIhE4PQ0fL0dpMedzsrLkl5U7hoBxv Erw8u9CeBb1zYb/oTnjldz3PuPyEq6gf6vQwIFhqyzhCTt7csYDqT8idQuh+8E3mGF5t RQoEmEQS7J7jfiAH2QP2zSf5CZRqe94jF8nVm+eBTYLFgsBgi314Pu5rfdbhjE8fnI9k TGrIEytREVkiKtMTiO5aJtzmPiOQcequHjoQ2hSYrUm19LifjmcEliEvWb60aO4rNKdM 1/x/kI3p5sakDQ0B9fhBQ+n4mLlkL71TDQ11txCt4I7/4sNgNiTxSQP2yPoD22H0OWbC WBDg== X-Received: by 10.67.14.166 with SMTP id fh6mr34972298pad.156.1448287856635; Mon, 23 Nov 2015 06:10:56 -0800 (PST) Received: from saurabh-desktop.asia.polycom.com ([122.183.18.146]) by smtp.gmail.com with ESMTPSA id w8sm10235294pfi.41.2015.11.23.06.10.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Nov 2015 06:10:56 -0800 (PST) From: Saurabh Sengar 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 Subject: [PATCH] thermal: exynos: use of_property_read_u8() Date: Mon, 23 Nov 2015 19:40:41 +0530 Message-Id: <1448287841-4816-1-git-send-email-saurabh.truth@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)