Commit c1a77ba4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

ASoC: ti: davinci-mcasp: Remove unnecessary conditional

Instead of double validating of_node, return value of
the boolean property directly.

We can't remove ifdeffery, because in OF_GPIO=n cases
it might bring unwanted surprises.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20211202205612.76216-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4db32072
...@@ -1870,12 +1870,10 @@ static int mcasp_reparent_fck(struct platform_device *pdev) ...@@ -1870,12 +1870,10 @@ static int mcasp_reparent_fck(struct platform_device *pdev)
static bool davinci_mcasp_have_gpiochip(struct davinci_mcasp *mcasp) static bool davinci_mcasp_have_gpiochip(struct davinci_mcasp *mcasp)
{ {
#ifdef CONFIG_OF_GPIO #ifdef CONFIG_OF_GPIO
if (mcasp->dev->of_node && return of_property_read_bool(mcasp->dev->of_node, "gpio-controller");
of_property_read_bool(mcasp->dev->of_node, "gpio-controller")) #else
return true;
#endif
return false; return false;
#endif
} }
static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp, static int davinci_mcasp_get_config(struct davinci_mcasp *mcasp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment