diff options
author | glebius <glebius@FreeBSD.org> | 2012-07-02 07:39:55 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-07-02 07:39:55 +0000 |
commit | 0b1a43ced6360e8de2d50551e8df96e8f38139e0 (patch) | |
tree | e9d0449fed5d1356ac10c7cfe09237bcbe463c70 | |
parent | e161e8619f2f012952324e28f7604e2874c1bea4 (diff) | |
download | FreeBSD-src-0b1a43ced6360e8de2d50551e8df96e8f38139e0.zip FreeBSD-src-0b1a43ced6360e8de2d50551e8df96e8f38139e0.tar.gz |
- Call bus_generic_attach() at end of hdspe_attach().
- Use own devclass_t in DRIVER_MODULE().
This fixes operation of hdspe(4) when built as loadable module.
Submitted by: Ruslan Bukin <br bsdpad.com>
-rw-r--r-- | sys/dev/sound/pci/hdspe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c index 69c372d..f3377fb 100644 --- a/sys/dev/sound/pci/hdspe.c +++ b/sys/dev/sound/pci/hdspe.c @@ -347,7 +347,7 @@ hdspe_attach(device_t dev) hdspe_map_dmabuf(sc); - return 0; + return (bus_generic_attach(dev)); } static void @@ -407,4 +407,6 @@ static driver_t hdspe_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, pcm_devclass, 0, 0); +static devclass_t hdspe_devclass; + +DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, hdspe_devclass, 0, 0); |