Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp6474023pxu; Thu, 24 Dec 2020 03:24:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJznlHsDsTLeenMZ34lwDdxAxcB2OJJB299NDKoil+aAGqPrGz/uhCDgYi5+9oXa+C52drs2 X-Received: by 2002:a50:b586:: with SMTP id a6mr28315686ede.206.1608809049944; Thu, 24 Dec 2020 03:24:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608809049; cv=none; d=google.com; s=arc-20160816; b=HhFJ/U7HW5Bl5/f38H+KjhaqIjNuZJWDcL4rr4jQT4Cvobkmi3SiRnITx8IlQCiB4a cdt887o7Fjora8zM1/iFoE/KZr/2qS4WWmv9Wrb/D4A2edA7dEmHS1WEV6IeT7zN5UTm lZijt+K8Wpfg4VmgqtRztSRfxKCuTisCXDhs8e6l+nmbyBTImmLMN7RmHMG1uCNgjGVG 4lJ0pnYHQnkdYZ/fRhEk1743Wq6whvi2IoxWH7FnCdXwB5F4BhH2bdiKYRhcHBHcbUAh 3s0Tj2Sw6f/r1g7oAyEgDfC+vfgTSc+9XI6dOp06liMwZdZfU9UZ2U6jTIPWWgZvwKg/ FkiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=6ef1Y/wT/YxAUYOSfWMBMRXmZUruYuAkUBovxu7izrA=; b=zKnPcE/G3xdI8tPkxjqzwWFIC/9TZI1iY6sulcVaJcKN1bawDInY7oYNX87Y5hriUd uijwcQ+LTYR5MIMyhAzNFsajkbNFVLqnuvfMZiKQ4UB7l2bm8fdlb4xP1uPgmlPp7zXd F1yIBHAdWYCZU0xBFpjNnU2qoFOglMBfznuVBakZPZXdrbSIMhakw+X2mboxs2tT6d7H cIlkbbqrPUV4vuBB5qCfO1HH8xBlfP7ma8IBEdSAa+i+d4G/ZXnzaRDe2LdAjFwJWdTp AmMac4nek39da2oxAetaWypyQpQkzq04nG+ntWMupLU+A3Rhw1xubNHdC6pYY69EwbQI Kuhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@maquefel.me header.s=mail header.b=CoCN9Atw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w1si15468513edl.297.2020.12.24.03.23.47; Thu, 24 Dec 2020 03:24:09 -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=fail header.i=@maquefel.me header.s=mail header.b=CoCN9Atw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727836AbgLXLXG (ORCPT + 99 others); Thu, 24 Dec 2020 06:23:06 -0500 Received: from forward101p.mail.yandex.net ([77.88.28.101]:46234 "EHLO forward101p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbgLXLXE (ORCPT ); Thu, 24 Dec 2020 06:23:04 -0500 Received: from sas1-46fc755e9ad1.qloud-c.yandex.net (sas1-46fc755e9ad1.qloud-c.yandex.net [IPv6:2a02:6b8:c08:168c:0:640:46fc:755e]) by forward101p.mail.yandex.net (Yandex) with ESMTP id CBA5E3282A27; Thu, 24 Dec 2020 14:22:16 +0300 (MSK) Received: from sas2-1cbd504aaa99.qloud-c.yandex.net (sas2-1cbd504aaa99.qloud-c.yandex.net [2a02:6b8:c14:7101:0:640:1cbd:504a]) by sas1-46fc755e9ad1.qloud-c.yandex.net (mxback/Yandex) with ESMTP id OOszU6btW6-MGDGocsQ; Thu, 24 Dec 2020 14:22:16 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1608808936; bh=6ef1Y/wT/YxAUYOSfWMBMRXmZUruYuAkUBovxu7izrA=; h=In-Reply-To:References:Date:Subject:To:From:Message-Id:Cc; b=CoCN9Atwi/Bty+21ZBJa5mf4undEl8l7VWoMT+Vf90hFViqdKqqdQQRQl9L3ebxyG 4yhys8pvqYO2NzPxzSXHV+86MZFCtxYhRd6dpzHDbHzzL3vplaxXU4hjmUki0nP8LO Pnbhp8xb4SGR9Zh6mH+xy/EHl2X+1BzJ1se1Re7E= Authentication-Results: sas1-46fc755e9ad1.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by sas2-1cbd504aaa99.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id wXm6oVjgK4-MGJeQTE8; Thu, 24 Dec 2020 14:22:16 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Nikita Shubin Cc: Nikita Shubin , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 2/3] gpio: ep93xx: drop to_irq binding Date: Thu, 24 Dec 2020 14:22:02 +0300 Message-Id: <20201224112203.7174-3-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201224112203.7174-1-nikita.shubin@maquefel.me> References: <20201224112203.7174-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As ->to_irq is redefined in gpiochip_add_irqchip, having it defined in driver is useless, so let's drop it. Also i think it is worth to give a gentle warning in gpiochip_add_irqchip, to prevent people relying on to_irq. For example WARN_ON_ONCE(gc->to_irq, "to_irq is redefined in gpiochip_add_irqchip" \ "and you shouldn't rely on it\n"); Signed-off-by: Nikita Shubin --- drivers/gpio/gpio-ep93xx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c index d6db0ff16581..90afe07213ce 100644 --- a/drivers/gpio/gpio-ep93xx.c +++ b/drivers/gpio/gpio-ep93xx.c @@ -325,11 +325,6 @@ static int ep93xx_gpio_set_config(struct gpio_chip *gc, unsigned offset, return 0; } -static int ep93xx_gpio_f_to_irq(struct gpio_chip *gc, unsigned offset) -{ - return EP93XX_GPIO_F_IRQ_BASE + offset; -} - static int ep93xx_gpio_add_ab_irq_chip(struct gpio_chip *gc, struct platform_device *pdev, struct ep93xx_irq_chip *eic, @@ -407,7 +402,6 @@ static int ep93xx_gpio_add_f_irq_chip(struct gpio_chip *gc, } girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; - gc->to_irq = ep93xx_gpio_f_to_irq; return 0; } -- 2.26.2