From patchwork Wed Mar 24 08:19:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12160459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ACBDC433DB for ; Wed, 24 Mar 2021 08:21:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF5CB619B6 for ; Wed, 24 Mar 2021 08:21:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF5CB619B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RCFs7CQsAh+GAQtKK2F55ynoTmcCKmH5p5HTEHiaOZM=; b=TT4SQy0bSk88UZV7mLyK4Kz83 wMJJ6EpWow4TyVHFaBXjX/CmgUKzojWCIhy73KpghHiLK9WLIJ6V2fB571cEk4QdTBr+3cjR6HoFX RiPTGacIcMR4DpkzgqSY3M+O8/Rimia7a3LvfY+qAkealpZVG48OB+EgwP88hpXTvJ9bKgLgphHN2 zPpuD2nbFl3LD2faIwM4GBPB12AimKGw8/2ECG+eez4DwRxKPYptqIPIAMJy6hlAplExeaYzgqkeU ++hWKBu1liNqkWw/+I34C+DQboUWgNtVGLDAKpomTAl1en02YmJr2LdjyhTauBRF/OI3pJ2+ZkrlH ixX2y6Zfw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOyjk-00GYpV-2v; Wed, 24 Mar 2021 08:19:32 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOyjf-00GYnl-NW for linux-arm-kernel@lists.infradead.org; Wed, 24 Mar 2021 08:19:29 +0000 Received: by mail-wm1-x32c.google.com with SMTP id g25so12418353wmh.0 for ; Wed, 24 Mar 2021 01:19:27 -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=qB49MCaUQa6wbIJ0vkp0O6ksgPfiyzCzGUz5+mT9oV8=; b=dptZkcq+qEu7d7RGW9Sm+Vj8Smefx9cQy05FKEvHOQqM9/FmGBi4lkTh74vCDnr395 QECgLhprTst8Y9X3ObzXl4X9dvQlS9CTqBE7Z1MnqtVAZ7q8CPll2C6V7PKigBwUGmqd YjBMBsMQTlq0vw0VBEefdNk2nkBpZ8jFwteEXcvW+0E4Pmj+MrQM6NvBU/4p6qjLsYWC pLDvObQ13x3oeejmAAFjgIkvu/6uZBm5Az1MzvqecH0BXHIE88l0VVZ+W5L9KoijFtfP Kqv0eciqafiSloBwyjVSi50ubJCnx44H9CiGnXg6mhoYoK7FCCpXwXDz1gQVp+U2z3xt VqCw== 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=qB49MCaUQa6wbIJ0vkp0O6ksgPfiyzCzGUz5+mT9oV8=; b=lYF6p8TgRoVEMTRvZY2ooq//mrDJr+YhTHr1k7pBvXXL7wUvQlHdXrJoTLbcJcicqO XfRcqwe/lQA0id/wo2vLpc4iaFLOElskbjQ4z7SUVRzP5Jl7jFQ8ebCYaBeqUKigkZQS X8no3wgm/YulzqDnx6mZq/UstGlhtD7JMQGE75nJ4WnDp9Q+F+JSQ9Hz7USzUe/sLIYS Sq9DkzQI/tQqThJV82ywRjNBN5BZaRx2Qm10CAVsHZPT4SitS6jRTU9enaXkYduHfT8S TP7ZuziEx7AQE1UrS6NQiyBGsBHHc+VQLhh/cFmnJ7Ns5Q3tExfxmA8WgG26TtAQ6BMm GX4Q== X-Gm-Message-State: AOAM530NykAdZd4WKGo4vS3h1pcbaTOwZfez294WjeHAhJNNfXVEP07E 8S0zOtM2mQobc50o3qIyzos= X-Google-Smtp-Source: ABdhPJzdeJsapCHgmO4hy9pQFutrgHtCt03VG/pY5PyuWDAm1oyUFMi2h8eVAQTOM/5CbcRB5rbKyA== X-Received: by 2002:a7b:cf18:: with SMTP id l24mr1655069wmg.182.1616573966651; Wed, 24 Mar 2021 01:19:26 -0700 (PDT) Received: from skynet.lan (51.red-83-44-13.dynamicip.rima-tde.net. [83.44.13.51]) by smtp.gmail.com with ESMTPSA id x25sm1498578wmj.14.2021.03.24.01.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 01:19:26 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Lee Jones , Michael Walle , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Jonas Gorski , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Necip Fazil Yildiran , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v9 01/22] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Date: Wed, 24 Mar 2021 09:19:02 +0100 Message-Id: <20210324081923.20379-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324081923.20379-1-noltari@gmail.com> References: <20210324081923.20379-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210324_081928_083734_7074A62B X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Acked-by: Bartosz Golaszewski --- v9: no changes v8: no changes v7: no changes v6: 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);