Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4736926pxj; Wed, 12 May 2021 12:03:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcvyBpXtvp68hh9JVfGgeeIaj0kF3xKF3qmrbKHAy1OZ1PndYfl1FNs0WL5PUYBkrXJR2T X-Received: by 2002:a17:906:1f88:: with SMTP id t8mr38434935ejr.383.1620846222715; Wed, 12 May 2021 12:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620846222; cv=none; d=google.com; s=arc-20160816; b=LWHhX6Xz7D1YYPPjat5sZ6RAoMk/cyoR2TEAVeyKu0pKZGPe2nQa6MDBASFoIhbQSS wtrlnCoHh+ED5p6L5quB1Jh31yh73mnOGicVi3wJH7hTm4pdsfidZhdB2lwq0y4XHNJc DfLY8ZvPxsW2yKh/A46VqmwTSt0/7jiG8y/mezYjytJmbnrfUPn3jfOD7GXla0X0eVnh /GcUg2dGAHFBgWf+Wvf4Wq9JRQApO3nrZEwoULb9JuDIGUK2uD2fubgY9qMNUTxBag6g KBGMu4FdAOJpUreoI9UX5AJ5HaWARBuDO0Nukkzt3XWVLH9Rxi+G/UWNwKt7OtZaXqv7 WQDg== 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=bPDrTUPHlgFBMdpj9zxsNL+wHul0ghxe1lmq2wKIdpU=; b=h/ZNfn61FdEYkeSWm/5InIwNfM6WXSOS6za8GlCzQXW6tVfaeS8hNxOPKK2wzR4bIO Y6aMh0zFEB8Q+Dt23GCboikMauzp0DSHf6fL9DvGEW8zGTMn2dG9ZU3wNFV5s407cvWj jeXhQgSRpewhazpBrxRhcd3ivxRt599QTyRS2a9aZBNxulUx1dfACx8Ctjz/yOqoXUGq /tVu/V0tsapAoxRiN/kWj5NQHUdN4zwLTqD4/RDELS9S/dQxee5Nwn+KdE6e4FRRpA1r SwHQBhr10WAu2KcAkHUE3psjn3r2Wz+qgQkQCxdbZhnxkKH+vc4T73ifLswC9nI2jlmH jUNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aLrz9Utz; 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 hb7si664480ejc.507.2021.05.12.12.03.11; Wed, 12 May 2021 12:03:42 -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=aLrz9Utz; 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 S1376282AbhELSyV (ORCPT + 99 others); Wed, 12 May 2021 14:54:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:35836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244018AbhELQm0 (ORCPT ); Wed, 12 May 2021 12:42:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D82CC61CFE; Wed, 12 May 2021 16:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620835766; bh=QYhKg1ipg8gwStly9KfleUaRd3j7GsHD+zBg5syh+Bo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aLrz9UtzMR8gzuErOj1gkd7oPt9CpWaO2or28E7roVrWxeq7zpYRgf51/KB8UQgqa nG7BmuRb0gJlQF97oHclj/vciMx4a3uG/huAfFpZ+dXGDlEPL1l4vFBWVc1/pLNA8M Hn0VgI2WAz/dx7VR7pIZucoLKlvNkXLpOdEdVVRc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Walle , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Linus Walleij , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.12 476/677] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Date: Wed, 12 May 2021 16:48:42 +0200 Message-Id: <20210512144853.166617268@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144837.204217980@linuxfoundation.org> References: <20210512144837.204217980@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: Álvaro Fernández Rojas [ Upstream commit 9c7d24693d864f90b27aad5d15fbfe226c02898b ] The current code doesn't check if GPIOLIB_IRQCHIP is enabled, which results in a compilation error when trying to build gpio-regmap if CONFIG_GPIOLIB_IRQCHIP isn't enabled. Fixes: 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") Suggested-by: Michael Walle Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Linus Walleij Reviewed-by: Michael Walle Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20210324081923.20379-2-noltari@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- include/linux/gpio/driver.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 286de0520574..ecf0032a0995 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -624,8 +624,17 @@ void gpiochip_irq_domain_deactivate(struct irq_domain *domain, bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gc, unsigned int offset); +#ifdef CONFIG_GPIOLIB_IRQCHIP int gpiochip_irqchip_add_domain(struct gpio_chip *gc, struct irq_domain *domain); +#else +static inline int gpiochip_irqchip_add_domain(struct gpio_chip *gc, + struct irq_domain *domain) +{ + WARN_ON(1); + return -EINVAL; +} +#endif int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset); void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset); -- 2.30.2