Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1261722pxb; Thu, 4 Mar 2021 07:17:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzsERRyu5eZJJTUgxaBQ7mC0qiuhRMXvDK5ZiPZB0aNt9MHAoGii6HOooH1SdYLeXSx1G2P X-Received: by 2002:a17:906:4fc8:: with SMTP id i8mr4685625ejw.228.1614871036077; Thu, 04 Mar 2021 07:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614871036; cv=none; d=google.com; s=arc-20160816; b=U2x6BhffCtH/fmD6L0BHtALR3Nv4K+55xXrPcyWa+cIC6jBuuwtQuZHQMsGH3rwqXo 9VmSuTFVkLE1sH6K/HJ3iEJMSyM1L5Qc5uWhybvrP95OIbTGBopt0WEshIKiNSvj7sUp 9w8coGwyKogcKpCBGvfyRnyyBs1D7yusT7+NYeFk67MwpWlUrlaBfSC6wDvGD9KDWNrG jTgsBBaaEsGxq08mmVUMbfdPc6Av2TkAR8LQwomVPAjPHZ52aWofLxP0NDcdzZUxf9P7 U0qauFBTn5uKtfgIzzmlKOwAz58Iy+gp9/cw6b5FX6feP/AgWLtd6cpON027WCLhJzZ9 P0bA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=gRKAra8yTS+83QOIqBkA7xEIT7nOTZWmVlWuZXnmDiQ=; b=JWHiV1F6PG6PsBlgnH135xhLLQ/PYTflurwkQfxt0gF2cvSJJxCXEB3QjRa9ho/PDq f4n5x8Cmmrrh6V2LpeEaK0+zCo+ogYNLm1vfC/guu4cBC9rYvO/oEFQGjm3cqdEadoeS aJK4OxifUZyEWSTG+w1XETDHrUNIMfuDrp7Tdo+retqgJtPXp3IX8m2623o6LDC5NyJ9 SgFXrzy8P4Mcj4s0bsuefIfGr3tVDirBiHAwRT/awpx5h4Cln2fra5oaDPijlX8oQVRW Pgk4PIxXpO4sNblOiLMW4z8teyO4hHkqVT0E8mA7DKxjpfCrBbo3vLzbdBB6w1he4Eca RM+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EXyBdZSR; 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 e16si7562587edz.607.2021.03.04.07.16.53; Thu, 04 Mar 2021 07:17:16 -0800 (PST) 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=EXyBdZSR; 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 S235922AbhCDHGF (ORCPT + 99 others); Thu, 4 Mar 2021 02:06:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235921AbhCDHFo (ORCPT ); Thu, 4 Mar 2021 02:05:44 -0500 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 3104EC061574; Wed, 3 Mar 2021 23:05:04 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id u16so8390497wrt.1; Wed, 03 Mar 2021 23:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gRKAra8yTS+83QOIqBkA7xEIT7nOTZWmVlWuZXnmDiQ=; b=EXyBdZSRqsRTGLoEO+lVtwiY2V0s8E9RtO2QzZfn3Y/GcjOg40cdEtuyDPt6m1QQIu o2F14FfOI1vpUXik+55nlMSalu0oIzt4qqrQAcO9xirq7vJZNCf53ve2wuVJQYv/6jmo V4ycTSgp6YfAOBvIWxtabPDSIIVcws5xtae79PtHQHZmNYAW4F2AaBBBltuBZzWcgGwJ hRBKrmDCxG4N0owse8vYp8hIRdJXL2HokYhXWh/btUxxGdlWyIoNhExa8NQdeevwCSrJ OV5AQHCZYl4DxnWEMaJhyvYJiXb10qx1u8q+N4lLe9D6Frby7dtBUCB7SDTfO27/qliZ klrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gRKAra8yTS+83QOIqBkA7xEIT7nOTZWmVlWuZXnmDiQ=; b=PB30cfj0VP4m4aBKOHIa7m5OzJGe6Wgt89OwKkb8/3CyBxXxJ+hil6F9Fbkjt4Da+7 IAItNjVfbYZUhpOkwW5vQjTlk3+nJQWt8D4tbSSRAvIe6Jfih0cXX8X6yGya/Cx+Y5fQ H/1ymTgaOSPeeUwlW61RLhV9rjZ74FQKFg6zMet3138O9TxMzjPZ+qpIhYYz60O301fF mBp+2cBcXdzQ86yyGSEkKnC3WcSu0fE9+Z4Z4d7VK4HOtVPMo5vwzgwlRd8tPSUkWLRP 8AmINxGkVS6fqP7bxPzjdiNa8FyIlt/0NY8H0Ygg2ogy0/xogk+JWWutVIAYndePlyTX H+QQ== X-Gm-Message-State: AOAM531SVvz/udHAG8WgPFTnv+a9zbvoREj6rRETGJA8XdJwk8WwV9Wc Z9fwrNYaWlFbsgKDBlNYq84= X-Received: by 2002:adf:ba87:: with SMTP id p7mr2458499wrg.298.1614841502915; Wed, 03 Mar 2021 23:05:02 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id t14sm36320340wru.64.2021.03.03.23.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 23:05:02 -0800 (PST) From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= To: Michael Walle , Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Subject: [PATCH] gpio: regmap: disable IRQ domain without GPIOLIB_IRQCHIP Date: Thu, 4 Mar 2021 08:05:01 +0100 Message-Id: <20210304070501.30942-1-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 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 without having selected CONFIG_GPIOLIB_IRQCHIP. Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap") Signed-off-by: Álvaro Fernández Rojas --- drivers/gpio/gpio-regmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c index 5412cb3b0b2a..fed1e269c42a 100644 --- a/drivers/gpio/gpio-regmap.c +++ b/drivers/gpio/gpio-regmap.c @@ -279,16 +279,20 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config if (ret < 0) goto err_free_gpio; +#ifdef CONFIG_GPIOLIB_IRQCHIP if (config->irq_domain) { ret = gpiochip_irqchip_add_domain(chip, config->irq_domain); if (ret) goto err_remove_gpiochip; } +#endif /* CONFIG_GPIOLIB_IRQCHIP */ return gpio; +#ifdef CONFIG_GPIOLIB_IRQCHIP err_remove_gpiochip: gpiochip_remove(chip); +#endif /* CONFIG_GPIOLIB_IRQCHIP */ err_free_gpio: kfree(gpio); return ERR_PTR(ret); -- 2.20.1