aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pci/neomagic.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pci/neomagic.c')
-rw-r--r--sys/dev/sound/pci/neomagic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c
index 25273633ff18..d7824c990a52 100644
--- a/sys/dev/sound/pci/neomagic.c
+++ b/sys/dev/sound/pci/neomagic.c
@@ -707,10 +707,11 @@ nm_pci_attach(device_t dev)
rman_get_start(sc->irq),
device_get_nameunit(device_get_parent(dev)));
- if (pcm_register(dev, sc, 1, 1)) goto bad;
+ pcm_init(dev, sc);
pcm_addchan(dev, PCMDIR_REC, &nmchan_class, sc);
pcm_addchan(dev, PCMDIR_PLAY, &nmchan_class, sc);
- pcm_setstatus(dev, status);
+ if (pcm_register(dev, status))
+ goto bad;
return 0;