Unverified Commit 0c1db366 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Mark Brown
Browse files

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: default avatarBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251205090534.27845-1-bartosz.golaszewski@oss.qualcomm.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 180cdb96
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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,