From patchwork Wed Dec 11 09:58:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 181194 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp307247ile; Wed, 11 Dec 2019 01:58:44 -0800 (PST) X-Google-Smtp-Source: APXvYqy+GNCsGyI5Mabokl72LR0QVkmkkwmwiQtx6hvkaMxJTHWXyAfRY0Qp3x8O1vp3FN7I68qB X-Received: by 2002:a05:6808:2d8:: with SMTP id a24mr2165825oid.88.1576058323951; Wed, 11 Dec 2019 01:58:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576058323; cv=none; d=google.com; s=arc-20160816; b=qVq+L2bq4yCIY61ZLBkOrbrF/sQXeCFl19LfvV79jefpV2LLjVvS5jCVx6leQMOH1q FHNREXRdvAK4CWLZQXroomgx3MU9tdv7C/TTTykhy7w6H6aDX1Hpac8hV7KGLrRQicqL wWAHqfXWcz+7/qJclUEEcfPRTCSCdds0ozcpjgiPg+GaJ6FlVwxk2DnOstgCI45gUt6L ZFKNov+rcHUy1uffSiTKlfsPCQVqik/e7VhXmR1LzwrCvL7Odb7xKnXh4CSvlg5pNtGk c0rsszcJrVVQUTtWIb2ofNT10aoCtct9CBgjAG3rgVd1tHWq1YrHOcSpqn7FnmeorE1q FFLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OXx9XO53uVwi3ak33l4H3Z3fkUzEjfR6oeMiOmgyZYM=; b=QVry64BuUuhXW0yzEtPK3xi32ZCBT3MKBbdf/69BdWaMcsrAdPKBUre1kOdXPaTjfJ m88Pd68eIrw5yzcPMF++B7xwWyHJSoCmMeexGGFacvBd6nr9Vba1n98N2k1xTHYf8wOU b2Fq+hPfW+izl8IDZxeoP4md2CmV9QY8tjvkuywhwli5OccmF5TsNBWDrNuPPbVmhSRk 4+oWXR4eHPDScrPXOACo/3N3KME42K11GAPGCxsRVmt6EWYku/Kx6gLwFWFmD3lkIlaH L7o9/tJZs3Vd/Bet9EcqYEWl/228mVaQmGtxQ+ZkyFTiR0H+l0e43vumwEZMAXlBPIXz A2+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I0d3LklY; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si892489ote.168.2019.12.11.01.58.43; Wed, 11 Dec 2019 01:58:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I0d3LklY; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728847AbfLKJ6m (ORCPT + 10 others); Wed, 11 Dec 2019 04:58:42 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33924 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728839AbfLKJ6l (ORCPT ); Wed, 11 Dec 2019 04:58:41 -0500 Received: by mail-pf1-f196.google.com with SMTP id l127so280394pfl.1 for ; Wed, 11 Dec 2019 01:58:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OXx9XO53uVwi3ak33l4H3Z3fkUzEjfR6oeMiOmgyZYM=; b=I0d3LklYC8p3N+I8ufKTUua0HdRPrRWT2UM79MwNgcNWopaJgAZoM5w608Sn2fEArm 0B8kjBtprDc2SBjxf8O4R5JxQVH9T6msgIwr64CLTWSnwmCGPDCSoLS7urmCtycp2ob3 SnFRYSPVGmEhhSTi4m5XwvIONSxoVrHybqJXmHv+OUzLa8yra6MXqS9j9Fdw/hAyKfmC vTK4sew6blqVyKjxv/Rl5jZOsC2H9lOMwpxqVJTdKe6JJ4D1/ydXHAPzK6Ik0AO3WcMa x9INvVeJcY6vbd1eBd4/iYus2wDImrH64Obl9gWzGJbZkn4gjn3YzXTy2xkKF2348OMU 7R+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OXx9XO53uVwi3ak33l4H3Z3fkUzEjfR6oeMiOmgyZYM=; b=dhg2kWOO6tpAlRvF1ZwDSqfaDGxo/b7tH5xuGPolFA8xpZDDva9Lezw1xIa0HnHbiS OTSTCdA2KJfI4n/i/lGMdvCHzkwLGwoYhz8Su+aUzY+s/FH7HP9EbXYK5Bx37DF0RyvP M7yHKOh7eN1MyOq+eflqrYWCH6Qa2W3DtwSjEUnmMxXbzE/Cc2qVajyweJX08i1Mb614 SjL+07PAViSCXlzIl6FkuxwegpOK3dZucOjwzjhWiqxL0/0bk0AXcMq8vAZCKDE6jUms PNehe/Mq74aMVax2oMSzBuPJePCcJo6PicWljo7H+keF8VAtuDznjvt3ocuuGRCGqKrx JPfQ== X-Gm-Message-State: APjAAAWICPxDp+9aO8T1r5j0OwL3M10O8c5ba2C+XCOPFIcLdH92+Upy PtFy6Blbg7rr3/AslT69AAL3ZQ== X-Received: by 2002:a63:e648:: with SMTP id p8mr3102185pgj.259.1576058320583; Wed, 11 Dec 2019 01:58:40 -0800 (PST) Received: from localhost ([14.96.106.177]) by smtp.gmail.com with ESMTPSA id q6sm2311917pfl.140.2019.12.11.01.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 01:58:39 -0800 (PST) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, agross@kernel.org, swboyd@chromium.org, stephan@gerhold.net, olof@lixom.net, Daniel Lezcano Cc: linux-pm@vger.kernel.org Subject: [PATCH] drivers: thermal: tsens: Work with old DTBs Date: Wed, 11 Dec 2019 15:28:33 +0530 Message-Id: <39d6b8e4b2cc5836839cfae7cdf0ee3470653b64.1576058136.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org In order for the old DTBs to continue working, the new interrupt code must not return an error if interrupts are not defined. Fixes: 634e11d5b450a ("drivers: thermal: tsens: Add interrupt support") Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 015e7d2015985..d8f51067ed411 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -109,7 +109,7 @@ static int tsens_register(struct tsens_priv *priv) irq = platform_get_irq_byname(pdev, "uplow"); if (irq < 0) { - ret = irq; + dev_warn(&pdev->dev, "Missing uplow irq in DT\n"); goto err_put_device; } @@ -118,7 +118,8 @@ static int tsens_register(struct tsens_priv *priv) IRQF_TRIGGER_HIGH | IRQF_ONESHOT, dev_name(&pdev->dev), priv); if (ret) { - dev_err(&pdev->dev, "%s: failed to get irq\n", __func__); + dev_warn(&pdev->dev, "%s: failed to get uplow irq\n", __func__); + ret = 0; goto err_put_device; }