ALSA: pcm - reject calls to open backend PCMs (temporary)

This stops userspace opening backlemd PCMs.

TODO: rework for upstream.

Signed-off-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
Liam Girdwood
2011-02-16 16:50:12 +00:00
committed by Sebastien Guiriec
parent ad2581ef84
commit 8ccfb4a31f

View File

@@ -2036,6 +2036,12 @@ int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
goto error;
}
if (substream->ops == NULL) {
snd_printd("cannot open back end PCMs directly\n");
err = -ENODEV;
goto error;
}
if ((err = substream->ops->open(substream)) < 0)
goto error;