Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4618389pxj; Wed, 12 May 2021 09:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaDtAUfA8EvTGAExHgGrBoKQ91XtoDrUmz+tVn1y1crcKnqkRHrs+Fqg8FvnseKMQXUjmU X-Received: by 2002:a50:fe04:: with SMTP id f4mr44106518edt.29.1620836464940; Wed, 12 May 2021 09:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836464; cv=none; d=google.com; s=arc-20160816; b=MShSnAIUm0ak17v6oskcFBIGoapy2vG3D0QXPktZX5K3gDgMavzdPKf2C1M1v6b6ix BedU0RXvuKsMIV5I9fpxIpn9MYPcJ03cklTy0r2pdUPonJ2nNXFBc3ffojVzkIZQ/YTP Q2YHKtHJy508kFH02JCzdOALjLuibwVePfZGNjGWDmO17uKoHqOXVEhMp/nwYIjLNcXZ snumtUe0NUKZ39Pc4uMF7qgti6ckoSp6/pSKYyCCcz5quzUOYMGKfRYdLYZAn/bP3+7A FoPeEK8ugX+6tp72mFxNeuTD9+q6thsok1DX2JUCvvG9giqPDitOtVc1ZKpK8bBhqN1v eW4g== 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=WnXhQ5VE0axNt25Q3PP41xbr5/MGV2Z5+gm6fQvVHUY=; b=QW/ZQM8I73YjpPwp3lATDO4VxXw2676PO8Px3nSHAveibS3+He71ytmECWWS8f0vsk R2m1g/u/Hkzuc6i7syFJNArN3qPROXm9B7RD522+eWMF0PalbPudNLageRzhac5yCWgu 3Ux4FB8pnxaeDQiScLU1vBTDRcDbhyxrwBXZABWfyPZCe0Sv7DVr1yYetM9xnvnvj2SJ Lrz/jvbqprzxJNAu1LBJL5AgwnXo51tJAhLqaQQW56WP4rzf+BiJXJVtVnI2qbmHSyCC NTU20hVtg75GOBzqerNAtRGVT4s+eutGHK0rWxiPpB6oj9Ml3EgffoMoV+Gi8tTDjkR8 XfpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ah6pETkc; 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 u10si262077ejh.112.2021.05.12.09.20.41; Wed, 12 May 2021 09:21:04 -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=Ah6pETkc; 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 S240622AbhELQSa (ORCPT + 99 others); Wed, 12 May 2021 12:18:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:55166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235545AbhELPfy (ORCPT ); Wed, 12 May 2021 11:35:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E90BB61C4D; Wed, 12 May 2021 15:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832673; bh=07RBw3ZjSB1v1axDDaIheg7qt6/zevqTI0ci2L4BeSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ah6pETkcGzHmPhMvnbUaaQqkHoY+cCa7B3xnq6UU1azUnfGMY3mYBRMwFaPcOIG2e NYMN5/O6qLwLApqiu+f3tlhZl1B/vNL8UT4iA9bPuhUStF0QQGZed1KXflD/aBwhla Ye+UqTlZYupZzatp7WXlzFBCBpjk5+sHKzj9cJVw= 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.10 377/530] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Date: Wed, 12 May 2021 16:48:07 +0200 Message-Id: <20210512144832.169273617@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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 4a7e295c3640..8e144306e262 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -637,8 +637,17 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gc, 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 #ifdef CONFIG_LOCKDEP -- 2.30.2