diff options
Diffstat (limited to 'sys/dev/sound/pci/ich.c')
-rw-r--r-- | sys/dev/sound/pci/ich.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index fbde0accfd28..500d6d95daac 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -695,7 +695,7 @@ ich_setstatus(struct sc_info *sc) device_printf(sc->dev, "PCI Master abort workaround enabled\n"); - pcm_setstatus(sc->dev, status); + pcm_register(sc->dev, status); } /* -------------------------------------------------------------------- */ @@ -860,12 +860,12 @@ ich_init(struct sc_info *sc) static int ich_pci_probe(device_t dev) { - int i; + size_t i; uint16_t devid, vendor; vendor = pci_get_vendor(dev); devid = pci_get_device(dev); - for (i = 0; i < sizeof(ich_devs)/sizeof(ich_devs[0]); i++) { + for (i = 0; i < nitems(ich_devs); i++) { if (vendor == ich_devs[i].vendor && devid == ich_devs[i].devid) { device_set_desc(dev, ich_devs[i].name); @@ -1066,8 +1066,7 @@ ich_pci_attach(device_t dev) ich_setmap, sc, 0)) goto bad; - if (pcm_register(dev, sc, 1, (sc->hasmic) ? 2 : 1)) - goto bad; + pcm_init(dev, sc); pcm_addchan(dev, PCMDIR_PLAY, &ichchan_class, sc); /* play */ pcm_addchan(dev, PCMDIR_REC, &ichchan_class, sc); /* record */ |