Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3764929pxt; Tue, 10 Aug 2021 10:47:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxW7tNHeFQIwFT4XWY7oQs9+T/QmEHHqNng2u/e6WuyBCDuDHj0e+nM1NUX6k5M5B+uFyaA X-Received: by 2002:a05:6602:2e0e:: with SMTP id o14mr56329iow.161.1628617642863; Tue, 10 Aug 2021 10:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617642; cv=none; d=google.com; s=arc-20160816; b=Hu0Iu4B9CKlYHHsEjC1oLcP/Mb2inPGFnOklLx2ZEEY1N299REiMDoHPpCh6knBomU psMy7wUij6+dJKLH6zLY26hdoSHE3PJVN5cGmZSDIV93CqcozVoLksjET6zDch2keJBn fB5t0dDA4HZ+pWjVt878dSK12kjkiwaEQDLXkWsGpKeqcXViF7kS08KFf9fk0uPOVjvl /X/UdNO2m+yYlWGluOhh0fzhz9bKykPnh1lEn2KJJ5Fox+IhbW9TlRtBQmBwqC8AVeNd HCrO6RJosIkR91eVrU45JWG/P7Slxk+AxAxPxm1KRdktLeoGO5cc5zbuSsClGtWzB9yG LdAQ== 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=AXpHVsYJ0CjdmmNruVlIo01iXncqpTUBcAlDCm7Vmww=; b=v9+jSYfQvY5Wx9q4qecVTqMatAmWWA0QD0t4Wi9WdjHfFeOBTfeg0JA7sDViM2EqqR YFgTrUhWslcQDSd/+rFkuyJlBMH3LelLbsJtaTT1hvNl70Qqp4jVsxp8fCe5Z9Wm1j1z jhRrboVhH2AqOaZz4pO4eCmnXFFYJuoxlz3O9LfHNvS0jFqdJp/36yEYclyK77HHTV1j E1SguQCP2k1ssxYd3jZwX0Uc1rKYnpbziBy5bau8NPJqurCc401fEEvY+UIrDnkCNYoL lgVU5dEZgsfURgYWHWAZ0rvhWGLjaM+yYlNnLQASC0SScOSa/FtSD+2r/COMlF5wn8Ri dZFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yC9n+4Vz; 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 f6si3193394ilq.132.2021.08.10.10.47.11; Tue, 10 Aug 2021 10:47:22 -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=yC9n+4Vz; 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 S236555AbhHJRqu (ORCPT + 99 others); Tue, 10 Aug 2021 13:46:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:41668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235860AbhHJRnx (ORCPT ); Tue, 10 Aug 2021 13:43:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4E27610A7; Tue, 10 Aug 2021 17:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617160; bh=ySdgxvltRO98Yof6wxQm2ulBxYe/gQDIxZkggTO7v6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yC9n+4VzciA219pQxn2j4O5af1wdkFu2OJcph1ChPdh2hn4UAszGe8e/2oEbmZ6sq Ox+6f6bJ3bZ08JkYI3dx/KOUlAmfa55Pm4F4XBmANRJHezoa7Pu3OcjvHWLZdo5g7x TOu9YSjZ0xSxUNSmtueB4hOQVivtj/aRc+3A9MrY= 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.10 037/135] gpio: tqmx86: really make IRQ optional Date: Tue, 10 Aug 2021 19:29:31 +0200 Message-Id: <20210810172956.938521606@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@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 5022e0ad0fae..0f5d17f343f1 100644 --- a/drivers/gpio/gpio-tqmx86.c +++ b/drivers/gpio/gpio-tqmx86.c @@ -238,8 +238,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); @@ -278,7 +278,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