Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3771027pxt; Tue, 10 Aug 2021 10:56:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM29hmpLo5FWy7hZqrpcbAvGA3w9U3n/Q5RuKnyqXZZL0ZX2OyGlF8PU+zGkqiX4bvw/De X-Received: by 2002:a02:b798:: with SMTP id f24mr28918664jam.14.1628618214881; Tue, 10 Aug 2021 10:56:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618214; cv=none; d=google.com; s=arc-20160816; b=WMLVztDZkhLJfQuvx2/kIGhHt419YWd3JctrLoVwnPqmMQcAbSTN7rvihAl3U042U2 fkjWaVOayXiASv+U6cT92LONbrL2s4zNbQ/DL4JwQ6nVg6fGJjgwubQ1oYdSAuOElev1 VAwdBNI0QJx5VciC0uEHvO3PNJZPOk1nX82UmGUaZjBaXVqsF5SkOe8TJ4rxOubNkXcS 9Sh8Z9fmD4SxVqZKG1vD27f6ablspfsuYgez+xIQ9lB5AKUVfoK4eEiquLAiONVcBZ5i Y9g5odqFT1DUq3QTYZ3FooRdEu4AFWkO2dN/HvfDezfvACDSpK+bOrL8f/z1BEGBYl1M DWiQ== 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=yZAEpBq17PECD+V+j2J8O27CksNsAqV3YpgqjcDqwf6BFtsKF1QYDs4QocYQ6rkWQS Nvh18MdbmiZ3QO4dDUO1ZI5U6gGpQKRTG1dFTuw3uHSFSevuhrguzJg9IaO7HOr9ZUjY n+J+W8/1BWf7cDBDz5K0cqNdzfgcb08LA915aaZkDlO9BrMLc7i4BkQaqxweYTx1G36M qt14R1Km8Rb3EFQjr7Swt+OPWwEc0odu/I1TRrv6ScpqcVh9EIb+IX05jyNQVOJVGDwA qSSe3FacaurrXY/5LW3YoqR9iiWv7O6msYgWx8acP6piVM/9Eih8ApR7kYmpECma4tKl FbQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mPoirRpu; 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 u10si1366532iog.10.2021.08.10.10.56.42; Tue, 10 Aug 2021 10:56:54 -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=mPoirRpu; 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 S234400AbhHJRz6 (ORCPT + 99 others); Tue, 10 Aug 2021 13:55:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:38632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236195AbhHJRws (ORCPT ); Tue, 10 Aug 2021 13:52:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A0F8C6136A; Tue, 10 Aug 2021 17:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617415; bh=ySdgxvltRO98Yof6wxQm2ulBxYe/gQDIxZkggTO7v6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mPoirRpuPawjiT6lPpx+WQ9rSXykybUnwg43vl6pPbpyouR0kkS3nivIN37+zxt3d +P6OyoL27PwO/2vUytJAQP+h99Gl1gXyu+2H2oqZB9ku/SKIeARe+y0zJMQN+wuTTJ zlqEL39iKOEoePLkneZiDthFL2bwt1DkIoq6NY3Y= 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.13 048/175] gpio: tqmx86: really make IRQ optional Date: Tue, 10 Aug 2021 19:29:16 +0200 Message-Id: <20210810173002.529271935@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810173000.928681411@linuxfoundation.org> References: <20210810173000.928681411@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