From patchwork Fri Jan 8 23:54:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 7991281 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E0209F6FA for ; Fri, 8 Jan 2016 23:54:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48441201C7 for ; Fri, 8 Jan 2016 23:54:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 614E3201E4 for ; Fri, 8 Jan 2016 23:54:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756099AbcAHXyQ (ORCPT ); Fri, 8 Jan 2016 18:54:16 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:53774 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754864AbcAHXyP (ORCPT ); Fri, 8 Jan 2016 18:54:15 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 1B8616037B; Fri, 8 Jan 2016 23:54:15 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0C051605B5; Fri, 8 Jan 2016 23:54:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5FD7C60153; Fri, 8 Jan 2016 23:54:14 +0000 (UTC) From: Stephen Boyd To: Zhang Rui , Eduardo Valentin Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, "Ivan T . Ivanov" Subject: [PATCH] thermal: qcom-spmi: Treat reg property as a single cell Date: Fri, 8 Jan 2016 15:54:13 -0800 Message-Id: <1452297253-5747-1-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 2.6.3.369.g91ad409 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We only read the first element of the reg property to figure out the offset of the temperature sensor inside the PMIC. Furthermore, we want to remove the second element in DT, so just don't read the second element so that probe keeps working if we change the DT in the future. Cc: Ivan T. Ivanov Signed-off-by: Stephen Boyd --- drivers/thermal/qcom-spmi-temp-alarm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom-spmi-temp-alarm.c index bf3da3cf2019..4644e7219725 100644 --- a/drivers/thermal/qcom-spmi-temp-alarm.c +++ b/drivers/thermal/qcom-spmi-temp-alarm.c @@ -200,7 +200,7 @@ static int qpnp_tm_probe(struct platform_device *pdev) struct qpnp_tm_chip *chip; struct device_node *node; u8 type, subtype; - u32 res[2]; + u32 res; int ret, irq; node = pdev->dev.of_node; @@ -215,7 +215,7 @@ static int qpnp_tm_probe(struct platform_device *pdev) if (!chip->map) return -ENXIO; - ret = of_property_read_u32_array(node, "reg", res, 2); + ret = of_property_read_u32(node, "reg", &res); if (ret < 0) return ret; @@ -228,7 +228,7 @@ static int qpnp_tm_probe(struct platform_device *pdev) if (PTR_ERR(chip->adc) == -EPROBE_DEFER) return PTR_ERR(chip->adc); - chip->base = res[0]; + chip->base = res; ret = qpnp_tm_read(chip, QPNP_TM_REG_TYPE, &type); if (ret < 0) {