mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: davinci-mcasp: remove unneeded #ifdef
@ 2025-12-05  9:05 Bartosz Golaszewski
  2025-12-15 13:58 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-12-05  9:05 UTC (permalink / raw)
  To: Peter Ujfalusi, Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: linux-sound, linux-kernel, Bartosz Golaszewski

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 <bartosz.golaszewski@oss.qualcomm.com>
---
 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 621a9d5f9377..db6913c05378 100644
--- a/sound/soc/ti/davinci-mcasp.c
+++ b/sound/soc/ti/davinci-mcasp.c
@@ -25,6 +25,7 @@
 #include <linux/math64.h>
 #include <linux/bitmap.h>
 #include <linux/gpio/driver.h>
+#include <linux/property.h>
 
 #include <sound/asoundef.h>
 #include <sound/core.h>
@@ -1875,11 +1876,7 @@ static int mcasp_reparent_fck(struct platform_device *pdev)
 
 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.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-15 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-05  9:05 [PATCH] ASoC: davinci-mcasp: remove unneeded #ifdef Bartosz Golaszewski
2025-12-15 13:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®