Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1980839ybl; Sat, 14 Dec 2019 03:54:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxKk3OC10XgPZySt64GncFD5PryAiy0BMjhAYn3vLMo6krGuSjrUvcxJW5kHJCKWa/QE9gi X-Received: by 2002:a9d:6a8f:: with SMTP id l15mr19657976otq.59.1576324452801; Sat, 14 Dec 2019 03:54:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576324452; cv=none; d=google.com; s=arc-20160816; b=wx4NBjILNgSqECO+5I7RQT5ZrGDDR3XVL1AAJQeePAemdVtgyHlMW5bi8Jg0himC6s +7tDcbZFKloOw6UDgPgsPUnhkI1jGwk1Ik2IP8YuO3fw7dc/7elw3o5GM+IxR4rSDXRV EcQsJ7z3puZl5yUxwoXLBYHR3+jJ3P/Dp7juUHwuuGYgM3Z0x4z+dReApKE6OtefLAa7 GhUjTHlC8poYLHzG8tSykiRBBDx2J6pn1y96wRRvtumt5/mUy9Puqx51COFFp6EqoAFg 33OK6g3qkXohNxL3pYwj4wz4DXTGFMihY+boxNQ30OuRt4PVqd7RFXpQJvmjQYoEPo0c hwBg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=jTsy1S1g5tDDqC964nhafWGg8yh/uqwQym+1hK8NfPA=; b=TSl4kT+3HF17nGYASlOFnJZNT6H2CHEbW7UzTPX5bGZNzrX01UfIizlp4MtP+aQRsB 143b8bd/ZqOJRncbqtpBi+pOR0VYXhaNwfYc7361HnSg0lB0PgEnKtWyWUtRnokC+PYu TAj55k5SDnBPFwNNCQSrdFweDpiguij2aM0C381oEEwOjsOOdiEYXWn6H0PsjeR3JnSt 9ivzlhgf0XqhdAYNorVlrPWxnCDj/j5kw8Ty1rL7dsqY37uaxX5uE37BWXSG8xm1WoYl eNzPu50H9GKx06dOY5CELqFImToqEM3dNqvULh3GOfjoR9+2g52H7OeRUT6e9/nTI5M0 PPFQ== 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 h139si6846618oib.85.2019.12.14.03.54.00; Sat, 14 Dec 2019 03:54:12 -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 S1726148AbfLNLxQ (ORCPT + 99 others); Sat, 14 Dec 2019 06:53:16 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40780 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbfLNLxP (ORCPT ); Sat, 14 Dec 2019 06:53:15 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 3AA43289F5A Subject: Re: [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs To: Guenter Roeck Cc: linux-kernel , Collabora Kernel ML , Guenter Roeck , Benson Leung , Dmitry Torokhov References: <20191129102254.7910-1-enric.balletbo@collabora.com> From: Enric Balletbo i Serra Message-ID: Date: Sat, 14 Dec 2019 12:53:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 29/11/19 16:56, Guenter Roeck wrote: > On Fri, Nov 29, 2019 at 2:23 AM Enric Balletbo i Serra > wrote: >> >> 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 > > Reviewed-by: Guenter Roeck > Queued for 5.6. >> --- >> >> 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 >> >