Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7874288ybc; Fri, 29 Nov 2019 02:26:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwzUNJ2VYfAMTK8s62ZgkJp9J4/n1sA95r7MpbDVvbE1k2dlJaCBCtF7IgiDsNXsVq8yQ5t X-Received: by 2002:a05:6402:184e:: with SMTP id v14mr43938929edy.138.1575023201761; Fri, 29 Nov 2019 02:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575023201; cv=none; d=google.com; s=arc-20160816; b=oiTQ4TXjnjUyQlYF9BW9SAR9+n7a6TYNORAvd0efdHV/er3rN+XQDY0qRN51ebHoTh 2jxbknFxcAN40XEF4BDxGsh84rgBALveLd4MJariwSGHhbP5McRVMc0CkZy6ZswFioAh 6hIfDMkJAc2YmiMN9p7pHCPNqnThi7FGEFLIOKmXTsILEzGqPuQnjzKCSQxY7PikHOMI pw8X+fqhNnGW+STVyMK7UV7c2BvxU9FX01khjls13+NHFH6pUbjh+afWsWmBd2SxrZuo Av3I0Sh70ivMDmaudFpDsS5UIfra7EuoJHnxpjCoTnDpG3IiD55HV5RmL8k13DsMsRmw zykg== 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 :message-id:date:subject:cc:to:from; bh=3rT7blXcXA1fqsRHd7aQy/ML04NZ+icJGWShwzTtF4Y=; b=GJaOdtROtqlURSwVdAPXDYpE7uBIg7hJDGppSsp3ylFqjjic4PkpRBTS2B4yuPuRsD ergKUX0/2se9ckOlMIJlEs2FokDsSU2/GlWrwtbzAx8tgRDoT9ufmVrSsHJTGct9r63/ qbljGfVn7FY8vKKvb5MUbPoLQFeompIjvDW9i5gHSnqgmrJNNFHJE+/jio5ag+sDMgmq KLPtwzJ7iWO1MjTRRI1WhNHUmkrZDv7KaUPjqA7EZXwf7Xv9k6V/4fs0/UVhZSc+o6y6 DKW1gV7njQHe+iaFIgUo9Re/HjQ5c6hOkgWBB2KHT9EVFK3Z19M00p4ruhUe+KFoVInU AJ2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15si7706707ejz.171.2019.11.29.02.26.18; Fri, 29 Nov 2019 02:26:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726702AbfK2KXC (ORCPT + 99 others); Fri, 29 Nov 2019 05:23:02 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59388 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbfK2KXC (ORCPT ); Fri, 29 Nov 2019 05:23:02 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 7EBF7292920 From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: Collabora Kernel ML , groeck@chromium.org, bleung@chromium.org, dtor@chromium.org Subject: [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs Date: Fri, 29 Nov 2019 11:22:54 +0100 Message-Id: <20191129102254.7910-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As platform_get_irq() now prints an error when the interrupt does not exist, use platform_get_irq_optional() to get the IRQ which is optional to avoid below error message during probe: [ 5.113502] cros_ec_lpcs GOOG0004:00: IRQ index 0 not found Signed-off-by: Enric Balletbo i Serra --- drivers/platform/chrome/cros_ec_lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c index dccf479c6625..ffdea7c347f2 100644 --- a/drivers/platform/chrome/cros_ec_lpc.c +++ b/drivers/platform/chrome/cros_ec_lpc.c @@ -396,7 +396,7 @@ static int cros_ec_lpc_probe(struct platform_device *pdev) * Some boards do not have an IRQ allotted for cros_ec_lpc, * which makes ENXIO an expected (and safe) scenario. */ - irq = platform_get_irq(pdev, 0); + irq = platform_get_irq_optional(pdev, 0); if (irq > 0) ec_dev->irq = irq; else if (irq != -ENXIO) { -- 2.20.1