diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2002-07-24 21:27:22 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2002-07-24 21:27:22 +0000 |
commit | a6999fc21e727af91099268ba69c201c8ee81041 (patch) | |
tree | 7460a8625996d830d346fb3bcf5753f3eef0287e /sys/dev/sound | |
parent | b44fbf3e4c7409d9763b80561d00d4552c086a87 (diff) | |
download | FreeBSD-src-a6999fc21e727af91099268ba69c201c8ee81041.zip FreeBSD-src-a6999fc21e727af91099268ba69c201c8ee81041.tar.gz |
Fake a resume method for this chip via calling detach/attach. This lets
ThinkPads using this chip to have sound after a suspend/resume sequence
without resorting to kldunload/kldload.
MFC after: 1 week
Diffstat (limited to 'sys/dev/sound')
-rw-r--r-- | sys/dev/sound/pci/csa.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 58704b9..6361f3e 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -360,6 +360,15 @@ csa_detach(device_t dev) return bus_generic_detach(dev); } +static int +csa_resume(device_t dev) +{ + csa_detach(dev); + csa_attach(dev); + + return 0; +} + static struct resource * csa_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -1023,7 +1032,7 @@ static device_method_t csa_methods[] = { DEVMETHOD(device_detach, csa_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_resume, csa_resume), /* Bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), |