Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8270735ybc; Fri, 29 Nov 2019 07:58:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyKOdkpXIx1heE649BcrFJjjfKBg0YSBviEkUlVXEV931sJSsALdeQDVNcTRR9JZT2qp/uu X-Received: by 2002:a17:906:7708:: with SMTP id q8mr61432506ejm.33.1575043087342; Fri, 29 Nov 2019 07:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575043087; cv=none; d=google.com; s=arc-20160816; b=FCcrznYNCRZ8DCUJ8CfoWpKVlpwVNljQBJUefcZR00YAgoh1edK2ggOx/b52t/hzX2 uXR1ciyCx0GlbqHGzAlcdf7aF5rT0wTuCEyLn66loHAkurblvTwjlFKr1bLfmQj1UW2Q IIm1n3V9m0eMhlRoiFNqbqMx9YFHb8RqfMeEpUvzhVkk7SCLOdfOcMmHwT576LWUV+v+ hnkYLPVjENNBz5Q98KK1d8W87mDZYSlFNaPSjq2ucYC0mxIF/UVGnoWKxxiib0Oy5bei +paF9v664n3m90xecYjp9ssxwsfCmKW39HY7VckraYuzPPGzv8DGMa8riSKi6tfPV13a 2J9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sIVjF1a6UBeMBa5jStnnwJLmBmNIBGhSUW6xgbSdn9o=; b=zJTVn3OGl8Uwpd51edPxdPZBJBQSG/3KVVow3s/k7ag1MHtk/wvtFU1j9Haf26s4ux 432a19TkIMKRAcgOCkfG++bfP4AA+V2KE6ZHKQmJcwYaT1hXTH9vbNXx1ZBGifnNUSMO Jca/bc1iK7Gq3ETq8WkZ8N1oOSNAO7OpUUVpYeNVkvVfOuaC0WaXeGbCx7O9sciGG5eQ qo8gMbGP03QfEH32XoiZXBx+NIlqeZKKSTEjv5WGovTf4Op87n1FCHhRPHtae/3HQuHV Po2GAcGFpBmRuIa3nFB9NdyBmsPDlTeZCF9ZidKL46FC0x2P7oqx8uxZB7BOOhd/uEA2 jCXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Qi8bFNJX; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l10si14623583ejb.336.2019.11.29.07.57.41; Fri, 29 Nov 2019 07:58:07 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Qi8bFNJX; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726950AbfK2P4p (ORCPT + 99 others); Fri, 29 Nov 2019 10:56:45 -0500 Received: from mail-yw1-f68.google.com ([209.85.161.68]:44620 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbfK2P4o (ORCPT ); Fri, 29 Nov 2019 10:56:44 -0500 Received: by mail-yw1-f68.google.com with SMTP id p128so11105221ywc.11 for ; Fri, 29 Nov 2019 07:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sIVjF1a6UBeMBa5jStnnwJLmBmNIBGhSUW6xgbSdn9o=; b=Qi8bFNJXs12GbKmWJI0T55gEsd1wU704U2bjjUo0DWc3SvJUMefCjTGMzhNi+dHboO lHGyaFSEAnrbu+jcpfpUEAai6H5vuemEjf4TMPqt8E+4p+TT84gUuMRcwQLlBtERec/a +7a5Y3Qx/ahjAmP/Y1IZzyncY+9+zinrHlirK1ti20BKmrDCBHOFit4Yh1E4vc1cDj0V tBVXupA6jA6W7O8j/K5dCik+bpfihONcVonM48Wli0HC4IDkaMdvjalmp2e2Jx6M5zKF I6vXJAWwiBAgb+r34bPYh0wVd1l1LcDpdUfgV+Jku3btSlPiBwvcMmR/Mb5WXzcXd7Vr YObA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sIVjF1a6UBeMBa5jStnnwJLmBmNIBGhSUW6xgbSdn9o=; b=tFzxT/8ud2Q+EuKnZ0r4WQr01v6hUKmVCP7ItufiecghECYRCwl4fSjaY5FLPCHGHk PzWz2L1I3dR0UlzQ+EehCapuMho2n2ltJ4QIKVku/PyZVbGEmA1vMuKqRj9LEIXlwp2t zBbjQT3pU0l8wTvAP2pHS5ZMI4i4vU2HtRyr3FbYa1XLk35Gqtakne1jfppMSiMZpAKD DLa/AZtOoWn0fPPhJr8kq8ThpcJIq2soQglzfrjmbJhLbrkGvpdcpNLdh9rJcxcRnqc8 FmTP+uG7JlDpl3zOeV+6SEDvbX8H4KWpDujD1KtBzxPrpD7uPPt8nNWZwOvRJjPhsM+O w3eg== X-Gm-Message-State: APjAAAXF7cY9efNqpofRkcjyJqb6tQ8jCn7djFozgsAfw6GqpfYTIYUV Q3vSP7l83YujyUsT8PM4OHrSwGc154kghe1xSa1U7Q== X-Received: by 2002:a81:2781:: with SMTP id n123mr12836330ywn.70.1575043001775; Fri, 29 Nov 2019 07:56:41 -0800 (PST) MIME-Version: 1.0 References: <20191129102254.7910-1-enric.balletbo@collabora.com> In-Reply-To: <20191129102254.7910-1-enric.balletbo@collabora.com> From: Guenter Roeck Date: Fri, 29 Nov 2019 07:56:30 -0800 Message-ID: Subject: Re: [PATCH] platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs To: Enric Balletbo i Serra Cc: linux-kernel , Collabora Kernel ML , Guenter Roeck , Benson Leung , Dmitry Torokhov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > > 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 >