Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3221623pxf; Mon, 15 Mar 2021 04:49:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzP5nI9wpivcn3bYFrMBsmCvQ5MCjkgFiP/QTrXT1WN4maAKgM8RsHcMpUrOMQ0pyK9UUX1 X-Received: by 2002:aa7:d656:: with SMTP id v22mr29104200edr.119.1615808944802; Mon, 15 Mar 2021 04:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615808944; cv=none; d=google.com; s=arc-20160816; b=eOkU57GwB09/Ph1mTRbRfa2AWebv0zj/Cns8Iwh5S8mc/+UaO+/vaJ8DPBZ83B2sJz 3Ic9ckmmCFZTqDKS72ecj7AVXD8NIXNlcrcz0P1ryzfyzlBAcN8sTL1XfK5RSaMVd0sS 4bMLtvTKP1T4zrtTj4LG96g/hQMlkVzGykuWNQUGSjFVk43WEujYdaSa4Wuimt3kEpyO HUzaIeEKgEJsOyGKx/X/A6tPhhfm+9md2OFsO2eCBFRq0ax/CFf4ujTu5S9rY0Oz5+FQ OnIwJNdBj3tw9EEnRFn7O7zyfU/OSQ/DuZtu/YfPQhlCVPPSadvlzxLK5jOBinSrazFV GrfQ== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PD9HjKWFmvLdbPAjldOGGzMm/Hz1Oa5DoKh83oaNvj4=; b=D4WGlLxxFUASC5pQ7VN7ee+XY+G9+YZj/Maz0bkcsXPilRHXns/rItfiMVCmpeQtTU f7UieBreH+4ehDICPOUtG/5yLWKCrU/wTND11fewGx3Vdt5p0A1xvVFoDfomooNW6CGt aQe94Eh+ASIxJAAj3CMYS7W+NelOiCOGLQLtZSlc7mMy2so9fEyqSujj2Q+jk39fIA23 ZhgHEnM/3s4NtujOO8crwIhXxgL/QWeuDSxu0pVVKCKzBjp4hcpoqEUq8Yt3wNTIlckM qbeBELBivtQFiUJ8vccJC6Hq5DNgAM+rFeYJUFvGGsbbwc1KpregEoOtm0CbWBk3/455 UhPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aUf5SCeW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e17si10783075edy.193.2021.03.15.04.48.42; Mon, 15 Mar 2021 04:49: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=@gmail.com header.s=20161025 header.b=aUf5SCeW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230359AbhCOLmy (ORCPT + 99 others); Mon, 15 Mar 2021 07:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbhCOLmT (ORCPT ); Mon, 15 Mar 2021 07:42:19 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36070C06175F; Mon, 15 Mar 2021 04:42:19 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id 61so5518593wrm.12; Mon, 15 Mar 2021 04:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PD9HjKWFmvLdbPAjldOGGzMm/Hz1Oa5DoKh83oaNvj4=; b=aUf5SCeWNCvGpPGuF/Al8oG3/IjAPcdDg1XbjoxXlf49/qYMdMoq4lKVVpAByOD7k4 4o6C+FREmpzqUczzvRsJc9g0gIIHoFZUHl+iaGTYMfFPeHpYKhRZ8jGImblOCkG503Oi UQSslLSZsqACAytRckB4JdF31fTA6PwhlTImbE1ECDY/xguOa90bB13O6SpgKigcPD/c oAgOqrXVB8wdATDkM5mgmYo2uwbVF7jPh0ZONyWOfM1aPMd+ex2ATtjPWwyprxovPX+M K5DQ8J/ZND3hcSa7npw8LxhiRs001lgBk5GTIAo1ka/q91DKih0oCxFiwsyrdruXFYJb C6MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PD9HjKWFmvLdbPAjldOGGzMm/Hz1Oa5DoKh83oaNvj4=; b=SPfnc714eTlW3hmQuoObPjlKB2LE9754abw1QZiQN/GJvVzGUcAn0tUPdYch4buqBV Y/GA2k+oxj4BclTfgR/MisZyYVuWYadllWiM8atVLpwYJ+jqG5nkQHTDN7eiFXFwFpQw cJDiFwttY97Wfjh4bLqa3oY+vwcxMpD4CVV57ThRWo6o59jTPFypDH/DE0L/LLQFHeGY Zg/FR5vMlLXLzyG3fzYYEqLJ20WwDSk8S2Ua/64Csbx7F/1Vr0UEnSytaSZ47be6PyuR AKTRyMp5I0+NJvkX34aKnYHVEnG3Ioa7372neeInZdxSTG+VdRAlrzhxpxQXh1geZcKn CuFQ== X-Gm-Message-State: AOAM531Y5Nn/eQPo1zFZotLlwED0gDy2dKsUqlXAOdTfspuK6HQZuLM2 59W2+cgJrULnF+4bUYAH72k= X-Received: by 2002:adf:9d82:: with SMTP id p2mr27184130wre.234.1615808537950; Mon, 15 Mar 2021 04:42:17 -0700 (PDT) Received: from skynet.lan ([80.31.204.166]) by smtp.gmail.com with ESMTPSA id v189sm12648187wme.39.2021.03.15.04.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 04:42:17 -0700 (PDT) From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Lee Jones , Michael Walle , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Jonas Gorski , Necip Fazil Yildiran , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 01/22] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Date: Mon, 15 Mar 2021 12:41:53 +0100 Message-Id: <20210315114214.3096-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210315114214.3096-1-noltari@gmail.com> References: <20210315114214.3096-1-noltari@gmail.com> 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 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 --- v7: no changes v5: add missing Suggested-by tag v4: add patch (fix include instead of gpio-regmap.c) 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.20.1