Don't attempt to initialize the pcaudio device on open. The attach routine

already does the initialization (though it didn't set pca_initialized, so
we always initialized twice) and since attach calls make_dev(), there's no
way that pcaopen() can be called before pcaattach().
This commit is contained in:
jhb 2001-10-08 23:35:40 +00:00
parent 16c9c17233
commit fbdcb5086a

View File

@ -144,7 +144,6 @@ static unsigned char alaw_linear[] = {
};
static int pca_sleep = 0;
static int pca_initialized = 0;
static void pcaintr(struct clockframe *frame);
@ -369,11 +368,6 @@ pcaopen(dev_t dev, int flags, int fmt, struct thread *td)
if (minor(dev) > 0)
return ENXIO;
if (!pca_initialized) {
pca_init();
pca_initialized = 1;
}
/* audio device can only be open by one process */
if (pca_status.open) {
pca_status.queries = 1;