diff options
author | Dominik Brodowski <linux@dominikbrodowski.de> | 2005-01-11 03:23:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-11 03:23:43 -0800 |
commit | b3eade622bd0f071cd2c965135308dde96db9dd2 (patch) | |
tree | 0417e462d0699b8c9e258defc4502c29a9789c34 /sound | |
parent | 50d2685125ac26df4dd23168b60dfb800edf2f70 (diff) | |
download | history-b3eade622bd0f071cd2c965135308dde96db9dd2.tar.gz |
[PATCH] pcmcia: BUG on dev_list != NULL
All in-kernel PCMCIA devices do unregister their client in their respective
->detach() function after a REMOVAL event. So, AFAICS, the dev_list iteration
should always be false.
Signed-off-by: Dominik Brodowski <linux@brodo.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 11 | ||||
-rw-r--r-- | sound/pcmcia/vx/vx_entry.c | 10 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxpocket.c | 2 | ||||
-rw-r--r-- | sound/pcmcia/vx/vxpocket.h | 1 |
4 files changed, 2 insertions, 22 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 0434acf1f75ac8..1276b3652601c3 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -274,15 +274,6 @@ static void snd_pdacf_detach(dev_link_t *link) } /* - * snd_pdacf_detach_all - detach all instances linked to the hw - */ -static void snd_pdacf_detach_all(void) -{ - while (dev_list != NULL) - snd_pdacf_detach(dev_list); -} - -/* * configuration callback */ @@ -413,7 +404,7 @@ static int __init init_pdacf(void) static void __exit exit_pdacf(void) { pcmcia_unregister_driver(&pdacf_cs_driver); - snd_pdacf_detach_all(); + BUG_ON(dev_list != NULL); } module_init(init_pdacf); diff --git a/sound/pcmcia/vx/vx_entry.c b/sound/pcmcia/vx/vx_entry.c index 1cd4a2751124d3..ad2917e4e69fd9 100644 --- a/sound/pcmcia/vx/vx_entry.c +++ b/sound/pcmcia/vx/vx_entry.c @@ -266,15 +266,6 @@ void snd_vxpocket_detach(struct snd_vxp_entry *hw, dev_link_t *link) } /* - * snd_vxpocket_detach_all - detach all instances linked to the hw - */ -void snd_vxpocket_detach_all(struct snd_vxp_entry *hw) -{ - while (hw->dev_list != NULL) - snd_vxpocket_detach(hw, hw->dev_list); -} - -/* * configuration callback */ @@ -397,4 +388,3 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar EXPORT_SYMBOL(snd_vxpocket_ops); EXPORT_SYMBOL(snd_vxpocket_attach); EXPORT_SYMBOL(snd_vxpocket_detach); -EXPORT_SYMBOL(snd_vxpocket_detach_all); diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 63aebb2b07f2f0..0818bd448e28a8 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -165,7 +165,7 @@ static int __init init_vxpocket(void) static void __exit exit_vxpocket(void) { pcmcia_unregister_driver(&vxp_cs_driver); - snd_vxpocket_detach_all(&hw_entry); + BUG_ON(hw_entry.dev_list != NULL); } module_init(init_vxpocket); diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h index 2902a3b5d5a6b8..c051424ccf5ceb 100644 --- a/sound/pcmcia/vx/vxpocket.h +++ b/sound/pcmcia/vx/vxpocket.h @@ -77,7 +77,6 @@ void vx_set_mic_level(vx_core_t *chip, int level); */ dev_link_t *snd_vxpocket_attach(struct snd_vxp_entry *hw); void snd_vxpocket_detach(struct snd_vxp_entry *hw, dev_link_t *link); -void snd_vxpocket_detach_all(struct snd_vxp_entry *hw); int vxp_add_mic_controls(vx_core_t *chip); |