Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp837189ybl; Tue, 28 Jan 2020 13:11:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzCqLmI1X1+Bv5ynCEl7Hz80ZjPI28zJExWO7JqkzW1Y9q15XpElQdHZ56kt+MuvUUy0dZH X-Received: by 2002:a05:6830:1042:: with SMTP id b2mr17832499otp.306.1580245860978; Tue, 28 Jan 2020 13:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580245860; cv=none; d=google.com; s=arc-20160816; b=Xhh/Q5eT6EF80KCoIFLs0wdi0TjQd7Ri1lRD1JKGv0aKdT4IKiM3uvf5M2H6ub0Azu CvPHUvvhol/e1EzOIqi/YCLztFkq2EckGYb2L4xoLVksIpqW1iu/mfhn9lSmGpH5ViSK HnLcD1fZi/xiNX10ms8N6JuQnXbKgcSUkU8YeJ39epAUx6U/QndZp9dDBQYC402CKgHF bc51vCEWCrmh4i/gmWGDw9me6PGjMUkUXuh6Fehw7WqkK2peChNGn1cn5SQ1dng4dE2E sur0m31H1eghqGVn+9KGU1hnVHIzVuvsQTiKIH9hNF3GB+xAqcq92ecsULFoGVgPfDJR oA8g== 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=nBHgKwjJWqZw6yhTgfoGycOkbqJ3zxQ/vCdm8QDOrSk=; b=VPOy5V36t5oCCAbYnU2rWrDun6HFCbExILUZce0uOmkywRP+xIrC79iEOdT8242KqA S+tT+u30Eq/vRiGRSLdb5Y364rLIwJUx0pJM8lvb0KnTZJsl0GSkncmoEUNOBrxwv5tO VDR/BbocLMPKUj5NQk5UxIRhe8bN45HwKPlfileWDeyhro+we3xyP22haW3V3DZcNjpI Q2ncJWIShnQHAbbBPgLh8of4dPunqnFTDTj4JxwICNqsDcoN60quTj34CKxp+y+jxV2t b/ubjInaLuQOQyIwvNSj+h7208pnR9zl7h9PI8BD5B8FQZ4jJyz5/rtKLYvgBNLCPwLj /xtQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f14si9503055oto.46.2020.01.28.13.10.48; Tue, 28 Jan 2020 13:11:00 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726291AbgA1VIw (ORCPT + 99 others); Tue, 28 Jan 2020 16:08:52 -0500 Received: from [167.172.186.51] ([167.172.186.51]:58046 "EHLO shell.v3.sk" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726143AbgA1VIw (ORCPT ); Tue, 28 Jan 2020 16:08:52 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 80912DED6C; Tue, 28 Jan 2020 21:09:01 +0000 (UTC) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oAgxOuU78ZEH; Tue, 28 Jan 2020 21:09:01 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id DD262DF353; Tue, 28 Jan 2020 21:09:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hjAfGRws14eA; Tue, 28 Jan 2020 21:09:00 +0000 (UTC) Received: from furthur.lan (unknown [109.183.109.54]) by zimbra.v3.sk (Postfix) with ESMTPSA id 72A40DED6C; Tue, 28 Jan 2020 21:09:00 +0000 (UTC) From: Lubomir Rintel To: Robert Jarzmik Cc: Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Lubomir Rintel Subject: [PATCH] gpio: pxa: Avoid a warning when gpio0 and gpio1 IRQS are not there Date: Tue, 28 Jan 2020 22:08:45 +0100 Message-Id: <20200128210845.332679-1-lkundrak@v3.sk> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Not all platforms use those. Let's use platform_get_irq_byname_optional() instead platform_get_irq_byname() so that we avoid a useless warning: [ 1.359455] pxa-gpio d4019000.gpio: IRQ gpio0 not found [ 1.359583] pxa-gpio d4019000.gpio: IRQ gpio1 not found Signed-off-by: Lubomir Rintel --- drivers/gpio/gpio-pxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c index 9888b62f37afb..567742d962aef 100644 --- a/drivers/gpio/gpio-pxa.c +++ b/drivers/gpio/gpio-pxa.c @@ -652,8 +652,8 @@ static int pxa_gpio_probe(struct platform_device *pde= v) if (!pchip->irqdomain) return -ENOMEM; =20 - irq0 =3D platform_get_irq_byname(pdev, "gpio0"); - irq1 =3D platform_get_irq_byname(pdev, "gpio1"); + irq0 =3D platform_get_irq_byname_optional(pdev, "gpio0"); + irq1 =3D platform_get_irq_byname_optional(pdev, "gpio1"); irq_mux =3D platform_get_irq_byname(pdev, "gpio_mux"); if ((irq0 > 0 && irq1 <=3D 0) || (irq0 <=3D 0 && irq1 > 0) || (irq_mux <=3D 0)) --=20 2.24.1