mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl-sai: Add device tree nodes and its availiable check
@ 2014-01-10  2:05 Xiubo Li
  2014-01-10 11:09 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Xiubo Li @ 2014-01-10  2:05 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: alsa-devel, linux-kernel, Xiubo Li

SAIs that are not connected on the board should have a
status = "disabled" property in their device tree nodes.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/fsl/fsl_sai.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index cdd3fa8..6b2ab91 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -404,6 +404,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
 	struct resource *res;
 	int ret;
 
+	if (!np || !of_device_is_available(np))
+		return -ENODEV;
+
 	sai = devm_kzalloc(&pdev->dev, sizeof(*sai), GFP_KERNEL);
 	if (!sai)
 		return -ENOMEM;
-- 
1.8.4



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

end of thread, other threads:[~2014-01-13 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10  2:05 [PATCH] ASoC: fsl-sai: Add device tree nodes and its availiable check Xiubo Li
2014-01-10 11:09 ` Mark Brown
2014-01-13  6:15   ` Li.Xiubo
2014-01-13 16:10     ` 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®