Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3760589pxt; Tue, 10 Aug 2021 10:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4RmZDWmdIv3xiZ0RTQHHhX1c7I03o1hDJw5JDcOhAgO3wMc4jCa9Ddpmnf6DEaswdxyzz X-Received: by 2002:a05:6402:5251:: with SMTP id t17mr6064582edd.157.1628617273644; Tue, 10 Aug 2021 10:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617273; cv=none; d=google.com; s=arc-20160816; b=jxz9oLSnwZjL4YxggpieVtrhOANjICkWakISujFVUj1MSmWZrtmPCjLBWzfYgcDzhF NxRXEXbzDGR0DXOdjdL57Mgd8rodtmh99PaQoqfpBMXD6b/YcmQPkpSiXDHrz9ub/So4 YL+N03RillfvM1QCMHS3WH+PEIOHUGchG2enkXYiT7kSyO1G4KAmBYrqG+X3aZ+3PqPc RxzD1wV/UZolIB62gSvDs1jypLzmySfGBfF2jb3RZHovn/0LQt8ISaElsWtC02mKva1D /8LZU4+7KwX5dvWTiWe/rgnmzOUGZdcNWFHVX1rcZaP7cvQtCQcGn1wecchQgmJt5ZM6 MzxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4XbSvRFHzkMijCO0QoKJ2/6srnUVZB2JdJJjPNBO7o8=; b=PAfAJCOz9haCNO0Dr+6t+tkhDYRoz81T6vZuZzbdYs+OioL6QdFYYsvONon6moYgJo GOI9uyNUMsy/mHNImgrSPhjL7YMmXVjlddXNVgUaztx8JsXR/eutklZFomlYZ2IpUmDF WYWEmz5wpNiRE+JPqhJ6xZx5qzrMj/PAAaEJ4s0/APzCkvU4S4TWrelZ/rGovGn7SYlG YdmYD7BctA1ALC0iN41opX5weyEzBjIZioyxXwwQcr26Ebahdyg2lGxbJqpM+fugzWNg YAKDwm3FHEqBYIG23pmuHUXC/TwV9qmgbfPWR9eafrbZWd4TTSmxKwA+avujsI6IW7B7 O2NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iJP8tWq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si20629844ejj.2.2021.08.10.10.40.49; Tue, 10 Aug 2021 10:41:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iJP8tWq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233849AbhHJRfz (ORCPT + 99 others); Tue, 10 Aug 2021 13:35:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:36686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232627AbhHJRen (ORCPT ); Tue, 10 Aug 2021 13:34:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0806360E09; Tue, 10 Aug 2021 17:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628616861; bh=3BNFiNOT6+j5Db8rEmPdLJrMAp5oMaqX49wllEV+pIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJP8tWq0E+vq4fD17l3RPnSLcR/SlqifOpICBd+lX50g/zg6gI9tGEJiPjbAHBk6D /FpJDKspurqllztgY4/OdtBkjnih1wCr6b1Gy69m5hUImN44PwTLw1WI1K5yUp+glP iLXHenOC5TCE5bQ1hSTplpfHnILbmLaeQgFalEoc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Schiffer , Andrew Lunn , Linus Walleij , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.4 25/85] gpio: tqmx86: really make IRQ optional Date: Tue, 10 Aug 2021 19:29:58 +0200 Message-Id: <20210810172949.049257220@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172948.192298392@linuxfoundation.org> References: <20210810172948.192298392@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthias Schiffer [ Upstream commit 9b87f43537acfa24b95c236beba0f45901356eb2 ] The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This causes warnings with newer kernels. Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a missing IRQ properly. Fixes: b868db94a6a7 ("gpio: tqmx86: Add GPIO from for this IO controller") Signed-off-by: Matthias Schiffer Reviewed-by: Andrew Lunn Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-tqmx86.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c index a3109bcaa0ac..09ca493b3617 100644 --- a/drivers/gpio/gpio-tqmx86.c +++ b/drivers/gpio/gpio-tqmx86.c @@ -235,8 +235,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev) struct resource *res; int ret, irq; - irq = platform_get_irq(pdev, 0); - if (irq < 0) + irq = platform_get_irq_optional(pdev, 0); + if (irq < 0 && irq != -ENXIO) return irq; res = platform_get_resource(pdev, IORESOURCE_IO, 0); @@ -275,7 +275,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); - if (irq) { + if (irq > 0) { struct irq_chip *irq_chip = &gpio->irq_chip; u8 irq_status; -- 2.30.2