From patchwork Tue Oct 18 23:40:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9383351 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D254560487 for ; Tue, 18 Oct 2016 23:42:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE14A29545 for ; Tue, 18 Oct 2016 23:42:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2C8929607; Tue, 18 Oct 2016 23:42:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 686B729545 for ; Tue, 18 Oct 2016 23:42:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwdzx-0002MA-K4; Tue, 18 Oct 2016 23:40:45 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bwdzu-0002LA-6V for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2016 23:40:43 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6DFD861A84; Tue, 18 Oct 2016 23:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1476834021; bh=1g8G4amGJKgE6WjZ8XA1RGcwQ5Ghu+wgB7wSvAl8hyI=; h=From:To:Cc:Subject:Date:From; b=XtjFjoDq54VpZj18lGG5ViI/Kd/MDK5qioXRoGP2XV+Ml6Qcx22R9mhnSjmkOA/C1 G6u7O0pr+RfLb/8bkxlKtj590rZtxwe4vAiyOKiijZinrRTAfKaIZQ3HTlTh6dfcOT BoJocT2YFrxkXjfqp5BTYdFmNPsKTWq2roxsovpk= Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BA78B618B9; Tue, 18 Oct 2016 23:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1476834021; bh=1g8G4amGJKgE6WjZ8XA1RGcwQ5Ghu+wgB7wSvAl8hyI=; h=From:To:Cc:Subject:Date:From; b=XtjFjoDq54VpZj18lGG5ViI/Kd/MDK5qioXRoGP2XV+Ml6Qcx22R9mhnSjmkOA/C1 G6u7O0pr+RfLb/8bkxlKtj590rZtxwe4vAiyOKiijZinrRTAfKaIZQ3HTlTh6dfcOT BoJocT2YFrxkXjfqp5BTYdFmNPsKTWq2roxsovpk= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org BA78B618B9 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=sboyd@codeaurora.org From: Stephen Boyd To: Zhang Rui , Eduardo Valentin Subject: [PATCH/RESEND] thermal: qcom-spmi: Treat reg property as a single cell Date: Tue, 18 Oct 2016 16:40:19 -0700 Message-Id: <20161018234019.5489-1-sboyd@codeaurora.org> X-Mailer: git-send-email 2.10.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161018_164042_714753_24E80F2B X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, "Ivan T . Ivanov" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Andy Gross --- This was sent in January of this year but hasn't been picked up. 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 819c6d5d7aa7..f50241962ad2 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) {