From 0c1db366642172e85ee98eeed7c127b80eb609a3 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Fri, 5 Dec 2025 10:05:34 +0100 Subject: [PATCH] ASoC: davinci-mcasp: remove unneeded #ifdef The enablement of the CONFIG_OF_GPIO switch has nothing to do with the "gpio-controller" property which may as well come from software nodes and GPIOLIB can still be enabled separately. This driver does not call any symbols from gpiolib-of.h so has no need to check this option at all. Just use the generic device property accessor. Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20251205090534.27845-1-bartosz.golaszewski@oss.qualcomm.com Signed-off-by: Mark Brown --- sound/soc/ti/davinci-mcasp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index 621a9d5f9377a..db6913c053789 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -1875,11 +1876,7 @@ err1: static bool davinci_mcasp_have_gpiochip(struct davinci_mcasp *mcasp) { -#ifdef CONFIG_OF_GPIO - return of_property_read_bool(mcasp->dev->of_node, "gpio-controller"); -#else - return false; -#endif + return device_property_present(mcasp->dev, "gpio-controller"); } static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp, -- 2.47.3