diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-07-07 20:59:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:24:05 -0400 |
commit | 1e212f3645a6b355de8c43a23376bc0e2ac49a63 (patch) | |
tree | 89324df417c19a1a63efb2ec6630e7d4b47181a0 /sound/pcmcia | |
parent | bf45d9b0ac108b11245203ebb082d30f5059846b (diff) |
[PATCH] pcmcia: move event handler
Move the "event handler" to struct pcmcia_driver -- the unified event handler
will disappear really soon, but switching it to struct pcmcia_driver in the
meantime allows for better "step-by-step" patches.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/pcmcia')
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 19 | ||||
-rw-r--r-- | sound/pcmcia/vx/vx_entry.c | 12 |
2 files changed, 8 insertions, 23 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 2d4f8e28478b..c8622f5f7c3a 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -171,14 +171,6 @@ static dev_link_t *snd_pdacf_attach(void) | |||
171 | 171 | ||
172 | /* Register with Card Services */ | 172 | /* Register with Card Services */ |
173 | client_reg.dev_info = &dev_info; | 173 | client_reg.dev_info = &dev_info; |
174 | client_reg.EventMask = | ||
175 | CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | ||
176 | #ifdef CONFIG_PM | ||
177 | | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | ||
178 | | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME | ||
179 | #endif | ||
180 | ; | ||
181 | client_reg.event_handler = &pdacf_event; | ||
182 | client_reg.Version = 0x0210; | 174 | client_reg.Version = 0x0210; |
183 | client_reg.event_callback_args.client_data = link; | 175 | client_reg.event_callback_args.client_data = link; |
184 | 176 | ||
@@ -387,12 +379,13 @@ static struct pcmcia_device_id snd_pdacf_ids[] = { | |||
387 | MODULE_DEVICE_TABLE(pcmcia, snd_pdacf_ids); | 379 | MODULE_DEVICE_TABLE(pcmcia, snd_pdacf_ids); |
388 | 380 | ||
389 | static struct pcmcia_driver pdacf_cs_driver = { | 381 | static struct pcmcia_driver pdacf_cs_driver = { |
390 | .owner = THIS_MODULE, | 382 | .owner = THIS_MODULE, |
391 | .drv = { | 383 | .drv = { |
392 | .name = "snd-pdaudiocf", | 384 | .name = "snd-pdaudiocf", |
393 | }, | 385 | }, |
394 | .attach = snd_pdacf_attach, | 386 | .attach = snd_pdacf_attach, |
395 | .detach = snd_pdacf_detach, | 387 | .event = pdacf_event, |
388 | .detach = snd_pdacf_detach, | ||
396 | .id_table = snd_pdacf_ids, | 389 | .id_table = snd_pdacf_ids, |
397 | }; | 390 | }; |
398 | 391 | ||
diff --git a/sound/pcmcia/vx/vx_entry.c b/sound/pcmcia/vx/vx_entry.c index 332bbca3dfc4..df7a39ba9680 100644 --- a/sound/pcmcia/vx/vx_entry.c +++ b/sound/pcmcia/vx/vx_entry.c | |||
@@ -35,7 +35,6 @@ MODULE_LICENSE("GPL"); | |||
35 | * prototypes | 35 | * prototypes |
36 | */ | 36 | */ |
37 | static void vxpocket_config(dev_link_t *link); | 37 | static void vxpocket_config(dev_link_t *link); |
38 | static int vxpocket_event(event_t event, int priority, event_callback_args_t *args); | ||
39 | 38 | ||
40 | 39 | ||
41 | static void vxpocket_release(dev_link_t *link) | 40 | static void vxpocket_release(dev_link_t *link) |
@@ -169,14 +168,6 @@ dev_link_t *snd_vxpocket_attach(struct snd_vxp_entry *hw) | |||
169 | /* Register with Card Services */ | 168 | /* Register with Card Services */ |
170 | memset(&client_reg, 0, sizeof(client_reg)); | 169 | memset(&client_reg, 0, sizeof(client_reg)); |
171 | client_reg.dev_info = hw->dev_info; | 170 | client_reg.dev_info = hw->dev_info; |
172 | client_reg.EventMask = | ||
173 | CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | ||
174 | #ifdef CONFIG_PM | ||
175 | | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | ||
176 | | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME | ||
177 | #endif | ||
178 | ; | ||
179 | client_reg.event_handler = &vxpocket_event; | ||
180 | client_reg.Version = 0x0210; | 171 | client_reg.Version = 0x0210; |
181 | client_reg.event_callback_args.client_data = link; | 172 | client_reg.event_callback_args.client_data = link; |
182 | 173 | ||
@@ -321,7 +312,7 @@ failed: | |||
321 | /* | 312 | /* |
322 | * event callback | 313 | * event callback |
323 | */ | 314 | */ |
324 | static int vxpocket_event(event_t event, int priority, event_callback_args_t *args) | 315 | int vxpocket_event(event_t event, int priority, event_callback_args_t *args) |
325 | { | 316 | { |
326 | dev_link_t *link = args->client_data; | 317 | dev_link_t *link = args->client_data; |
327 | vx_core_t *chip = link->priv; | 318 | vx_core_t *chip = link->priv; |
@@ -380,4 +371,5 @@ static int vxpocket_event(event_t event, int priority, event_callback_args_t *ar | |||
380 | */ | 371 | */ |
381 | EXPORT_SYMBOL(snd_vxpocket_ops); | 372 | EXPORT_SYMBOL(snd_vxpocket_ops); |
382 | EXPORT_SYMBOL(snd_vxpocket_attach); | 373 | EXPORT_SYMBOL(snd_vxpocket_attach); |
374 | EXPORT_SYMBOL(vxpocket_event); | ||
383 | EXPORT_SYMBOL(snd_vxpocket_detach); | 375 | EXPORT_SYMBOL(snd_vxpocket_detach); |