[PATCH v3 1/5] gpiolib: of: remove redundant IS_ENABLED check in of_find_mt2701_gpio()
From: Dmitry Torokhov
Date: Thu Oct 22 2026 - 17:56:52 EST
The entire of_find_mt2701_gpio() function as well as its entry in the
of_find_gpio_quirks table are already conditional on
IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448). Remove the redundant inner
check.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/gpio/gpiolib-of.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index f36e4b171fa7..03ce98baf68e 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -629,9 +629,6 @@ static struct gpio_desc *of_find_mt2701_gpio(struct device_node *np,
struct gpio_desc *desc;
const char *legacy_id;
- if (!IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448))
- return ERR_PTR(-ENOENT);
-
if (!of_device_is_compatible(np, "mediatek,mt2701-cs42448-machine"))
return ERR_PTR(-ENOENT);
--
2.56.0.257.gf7497c7d27-goog