Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1250302ybh; Thu, 12 Mar 2020 20:43:24 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtjszAujiKyqZKlnoUPREYERCMsGWou+LZm8OcyJs97/9heFVpS/DCFSyrIhI8aaK7I2MjX X-Received: by 2002:a05:6830:22ce:: with SMTP id q14mr8792371otc.298.1584071004103; Thu, 12 Mar 2020 20:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584071004; cv=none; d=google.com; s=arc-20160816; b=jH7ShYLNDKycdQxHXiCp7WSBCAh9FYoFf2tc+PP90O11/r4xkJ4hSFgvn3xnjMGCya UbL3Itt3xMaoe5aCHJXkYr/EqSsGHEqj2iYCuAOeiIQxzFTUM6texirL5eBIrOoZ9wCA W1H1zHVkVLsnkHiV3ziTIG5TnTql8vfDVNqK1taqc5dctTFg8ymKhU3SviU9oi27B9rC Qfw4tNb6OxTlCePpNM/3avNkuRzYKJVLqGsx+I9repEPlEDJ674vZRCYFe/GsdrL1Ybs WXWn9Zp94irimHgKc4s+hg9vf0RvMwB/ijVRoF6C9Cek2S58fvBP2r5G2tZVdm17sH/A hctw== 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:dkim-signature; bh=jiMFXGvBhCI5xK4iuBLsegdABOplq4HGKYU6z5QIHQ0=; b=Il6UyEYZF+VpW6sD7dArpZf1ZwsaR9z6kkyDBu2GZfXXJwBwzvn27LI8GLD0C4iyB0 panzQy3UQ5pfUQnf5lL295Atc1FD/EAplXEShYzDUPqtu0VKXHYecI47QyzUh/9t7HuN g/TLyRzFcpFdpU7uAVeTyZ790tBMZbT+oAUAfLLp5qgm6YnK1Maab9icfmsYqt9mc17y o0UwHb0FuNADzBCpbC4afnt3zw3hOmBhG6fVYYT4/LOnduRDGc8GUlydf5Gjtedk1Igl 2s9DF8VtPaJmzPBH4nSvk0Q76t08qlcgC3LB82z78x8M53bkLdqsZun8GGr8vKb3Z8l6 Mzmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=oZng4u7m; 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=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j2si3772364oii.195.2020.03.12.20.43.11; Thu, 12 Mar 2020 20:43:24 -0700 (PDT) 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=@alliedtelesis.co.nz header.s=mail181024 header.b=oZng4u7m; 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=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgCMDmx (ORCPT + 99 others); Thu, 12 Mar 2020 23:42:53 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:37055 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbgCMDmx (ORCPT ); Thu, 12 Mar 2020 23:42:53 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id A4BD08365A; Fri, 13 Mar 2020 16:42:49 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1584070969; bh=jiMFXGvBhCI5xK4iuBLsegdABOplq4HGKYU6z5QIHQ0=; h=From:To:Cc:Subject:Date; b=oZng4u7mbjanyfvvbVMxgRn36M0EK+F19nclv9E1iLkTJzBqhjryAFiVZdtD2bA5K c4cjOKED4cnG4wBxEzOZ6giitHAaURPpNOZIPg104yfb/gQPoAWXu6i8gl88tgzMOx V40BsAIxvVX7dcExkN170vWWv+dJTOiG5WCcJfgRLxWx2humBzvmbQ6udyD8ON41av 95fHQLrFbz6qd0tcpMhsgvTF68+35gVDrhxFMWdoUbtKj91xw8wRy4zKG7Hu3JIBvD Xq0BVNXkjfEm0tUBOIVPUzp4nIg5mpdmuTO7vMSeA1iu9Q4VWkRxr3KTjRjKMhmuhg n25ZiKgPpNQsg== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Fri, 13 Mar 2020 16:42:49 +1300 Received: from chrisp-dl.ws.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.20]) by smtp (Postfix) with ESMTP id 1F15C13EED5; Fri, 13 Mar 2020 16:42:47 +1300 (NZDT) Received: by chrisp-dl.ws.atlnz.lc (Postfix, from userid 1030) id 2F9A628006E; Fri, 13 Mar 2020 16:42:47 +1300 (NZDT) From: Chris Packham To: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, linus.walleij@linaro.org, bgolaszewski@baylibre.com Cc: linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH] gpio: mvebu: avoid error message for optional IRQ Date: Fri, 13 Mar 2020 16:42:44 +1300 Message-Id: <20200313034244.26336-1-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_irq() will generate an error message if the requested irq is not present mvebu-gpio f1010140.gpio: IRQ index 3 not found use platform_get_irq_optional() to avoid the error message being generated. Signed-off-by: Chris Packham --- drivers/gpio/gpio-mvebu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c index d2b999c7987f..3c9f4fb3d5a2 100644 --- a/drivers/gpio/gpio-mvebu.c +++ b/drivers/gpio/gpio-mvebu.c @@ -1247,7 +1247,7 @@ static int mvebu_gpio_probe(struct platform_device = *pdev) * pins. */ for (i =3D 0; i < 4; i++) { - int irq =3D platform_get_irq(pdev, i); + int irq =3D platform_get_irq_optional(pdev, i); =20 if (irq < 0) continue; --=20 2.25.1