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 --- drivers/bluetooth/bluecard_cs.c | 6 +----- drivers/bluetooth/bt3c_cs.c | 6 +----- drivers/bluetooth/btuart_cs.c | 6 +----- drivers/bluetooth/dtl1_cs.c | 6 +----- drivers/char/pcmcia/synclink_cs.c | 6 +----- drivers/ide/legacy/ide-cs.c | 6 +----- drivers/isdn/hardware/avm/avm_cs.c | 6 +----- drivers/isdn/hisax/avma1_cs.c | 6 +----- drivers/isdn/hisax/elsa_cs.c | 6 +----- drivers/isdn/hisax/sedlbauer_cs.c | 6 +----- drivers/isdn/hisax/teles_cs.c | 6 +----- drivers/mtd/maps/pcmciamtd.c | 6 +----- drivers/net/pcmcia/3c574_cs.c | 6 +----- drivers/net/pcmcia/3c589_cs.c | 6 +----- drivers/net/pcmcia/axnet_cs.c | 6 +----- drivers/net/pcmcia/com20020_cs.c | 6 +----- drivers/net/pcmcia/fmvj18x_cs.c | 6 +----- drivers/net/pcmcia/ibmtr_cs.c | 6 +----- drivers/net/pcmcia/nmclan_cs.c | 6 +----- drivers/net/pcmcia/pcnet_cs.c | 6 +----- drivers/net/pcmcia/smc91c92_cs.c | 5 +---- drivers/net/pcmcia/xirc2ps_cs.c | 6 +----- drivers/net/wireless/airo_cs.c | 6 +----- drivers/net/wireless/atmel_cs.c | 16 ++++++---------- drivers/net/wireless/netwave_cs.c | 6 +----- drivers/net/wireless/orinoco_cs.c | 6 +----- drivers/net/wireless/ray_cs.c | 6 +----- drivers/net/wireless/wavelan_cs.c | 7 +------ drivers/net/wireless/wl3501_cs.c | 18 ++++++------------ drivers/parport/parport_cs.c | 6 +----- drivers/pcmcia/cs_internal.h | 3 --- drivers/pcmcia/ds.c | 32 ++++++++++++++++++++------------ drivers/scsi/pcmcia/aha152x_stub.c | 6 +----- drivers/scsi/pcmcia/fdomain_stub.c | 6 +----- drivers/scsi/pcmcia/nsp_cs.c | 16 ++++++---------- drivers/scsi/pcmcia/qlogic_stub.c | 3 +-- drivers/scsi/pcmcia/sym53c500_cs.c | 5 +---- drivers/serial/serial_cs.c | 6 +----- drivers/telephony/ixj_pcmcia.c | 6 +----- drivers/usb/host/sl811_cs.c | 6 +----- include/pcmcia/ds.h | 8 ++++---- sound/pcmcia/pdaudiocf/pdaudiocf.c | 19 ++++++------------- sound/pcmcia/vx/vx_entry.c | 12 ++---------- 43 files changed, 85 insertions(+), 245 deletions(-) Index: 2.6.12-git10/drivers/scsi/pcmcia/fdomain_stub.c =================================================================== --- 2.6.12-git10.orig/drivers/scsi/pcmcia/fdomain_stub.c +++ 2.6.12-git10/drivers/scsi/pcmcia/fdomain_stub.c @@ -120,11 +120,6 @@ static dev_link_t *fdomain_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.event_handler = &fdomain_event; - client_reg.EventMask = - CS_EVENT_RESET_REQUEST | CS_EVENT_CARD_RESET | - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -314,6 +309,7 @@ static struct pcmcia_driver fdomain_cs_d .name = "fdomain_cs", }, .attach = fdomain_attach, + .event = fdomain_event, .detach = fdomain_detach, .id_table = fdomain_ids, }; Index: 2.6.12-git10/drivers/telephony/ixj_pcmcia.c =================================================================== --- 2.6.12-git10.orig/drivers/telephony/ixj_pcmcia.c +++ 2.6.12-git10/drivers/telephony/ixj_pcmcia.c @@ -69,11 +69,6 @@ static dev_link_t *ixj_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &ixj_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -307,6 +302,7 @@ static struct pcmcia_driver ixj_driver = .name = "ixj_cs", }, .attach = ixj_attach, + .event = ixj_event, .detach = ixj_detach, .id_table = ixj_ids, }; Index: 2.6.12-git10/drivers/pcmcia/ds.c =================================================================== --- 2.6.12-git10.orig/drivers/pcmcia/ds.c +++ 2.6.12-git10/drivers/pcmcia/ds.c @@ -207,6 +207,10 @@ static void pcmcia_check_driver(struct p unsigned int i; u32 hash; + if (!p_drv->attach || !p_drv->event || !p_drv->detach) + printk(KERN_DEBUG "pcmcia: %s does misses a callback function", + p_drv->drv.name); + while (did && did->match_flags) { for (i=0; i<4; i++) { if (!did->prod_id[i]) @@ -914,6 +918,7 @@ struct send_event_data { static int send_event_callback(struct device *dev, void * _data) { struct pcmcia_device *p_dev = to_pcmcia_dev(dev); + struct pcmcia_driver *p_drv; struct send_event_data *data = _data; /* we get called for all sockets, but may only pass the event @@ -921,11 +926,16 @@ static int send_event_callback(struct de if (p_dev->socket != data->skt) return 0; + p_drv = to_pcmcia_drv(p_dev->dev.driver); + if (!p_drv) + return 0; + if (p_dev->client.state & (CLIENT_UNBOUND|CLIENT_STALE)) return 0; - if (p_dev->client.EventMask & data->event) - return EVENT(&p_dev->client, data->event, data->priority); + if (p_drv->event) + return p_drv->event(data->event, data->priority, + &p_dev->event_callback_args); return 0; } @@ -992,6 +1002,7 @@ int pcmcia_register_client(client_handle client_t *client = NULL; struct pcmcia_socket *s = NULL; struct pcmcia_device *p_dev = NULL; + struct pcmcia_driver *p_drv = NULL; /* Look for unbound client with matching dev_info */ down_read(&pcmcia_socket_list_rwsem); @@ -1006,7 +1017,6 @@ int pcmcia_register_client(client_handle continue; spin_lock_irqsave(&pcmcia_dev_list_lock, flags); list_for_each_entry(p_dev, &s->devices_list, socket_device_list) { - struct pcmcia_driver *p_drv; p_dev = pcmcia_get_dev(p_dev); if (!p_dev) continue; @@ -1036,10 +1046,9 @@ int pcmcia_register_client(client_handle *handle = client; client->state &= ~CLIENT_UNBOUND; client->Socket = s; - client->EventMask = req->EventMask; - client->event_handler = req->event_handler; - client->event_callback_args = req->event_callback_args; - client->event_callback_args.client_handle = client; + p_dev->event_callback_args = req->event_callback_args; + p_dev->event_callback_args.client_handle = client; + if (s->state & SOCKET_CARDBUS) client->state |= CLIENT_CARDBUS; @@ -1061,12 +1070,12 @@ int pcmcia_register_client(client_handle ds_dbg(1, "register_client(): client 0x%p, dev %s\n", client, p_dev->dev.bus_id); - if (client->EventMask & CS_EVENT_REGISTRATION_COMPLETE) - EVENT(client, CS_EVENT_REGISTRATION_COMPLETE, CS_EVENT_PRI_LOW); if ((s->state & (SOCKET_PRESENT|SOCKET_CARDBUS)) == SOCKET_PRESENT) { - if (client->EventMask & CS_EVENT_CARD_INSERTION) - EVENT(client, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW); + if (p_drv->event) + p_drv->event(CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW, + &p_dev->event_callback_args); + } return CS_SUCCESS; @@ -1132,7 +1141,6 @@ int pcmcia_deregister_client(client_hand pcmcia_put_dev(p_dev); } else { handle->state = CLIENT_UNBOUND; - handle->event_handler = NULL; } return CS_SUCCESS; Index: 2.6.12-git10/drivers/scsi/pcmcia/sym53c500_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/scsi/pcmcia/sym53c500_cs.c +++ 2.6.12-git10/drivers/scsi/pcmcia/sym53c500_cs.c @@ -979,10 +979,6 @@ SYM53C500_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.event_handler = &SYM53C500_event; - client_reg.EventMask = CS_EVENT_RESET_REQUEST | CS_EVENT_CARD_RESET | - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -1013,6 +1009,7 @@ static struct pcmcia_driver sym53c500_cs .name = "sym53c500_cs", }, .attach = SYM53C500_attach, + .event = SYM53C500_event, .detach = SYM53C500_detach, .id_table = sym53c500_ids, }; Index: 2.6.12-git10/drivers/pcmcia/cs_internal.h =================================================================== --- 2.6.12-git10.orig/drivers/pcmcia/cs_internal.h +++ 2.6.12-git10/drivers/pcmcia/cs_internal.h @@ -114,9 +114,6 @@ static inline void cs_socket_put(struct #define CHECK_ERASEQ(q) \ (((q) == NULL) || ((q)->eraseq_magic != ERASEQ_MAGIC)) -#define EVENT(h, e, p) \ - ((h)->event_handler((e), (p), &(h)->event_callback_args)) - /* In cardbus.c */ int cb_alloc(struct pcmcia_socket *s); void cb_free(struct pcmcia_socket *s); Index: 2.6.12-git10/drivers/bluetooth/bluecard_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/bluetooth/bluecard_cs.c +++ 2.6.12-git10/drivers/bluetooth/bluecard_cs.c @@ -895,11 +895,6 @@ static dev_link_t *bluecard_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &bluecard_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -1103,6 +1098,7 @@ static struct pcmcia_driver bluecard_dri .name = "bluecard_cs", }, .attach = bluecard_attach, + .event = bluecard_event, .detach = bluecard_detach, .id_table = bluecard_ids, }; Index: 2.6.12-git10/drivers/isdn/hisax/avma1_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/isdn/hisax/avma1_cs.c +++ 2.6.12-git10/drivers/isdn/hisax/avma1_cs.c @@ -183,11 +183,6 @@ static dev_link_t *avma1cs_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &avma1cs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -514,6 +509,7 @@ static struct pcmcia_driver avma1cs_driv .name = "avma1_cs", }, .attach = avma1cs_attach, + .event = avma1cs_event, .detach = avma1cs_detach, .id_table = avma1cs_ids, }; Index: 2.6.12-git10/drivers/net/wireless/wavelan_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/wavelan_cs.c +++ 2.6.12-git10/drivers/net/wireless/wavelan_cs.c @@ -4684,12 +4684,6 @@ wavelan_attach(void) /* Register with Card Services */ client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_REGISTRATION_COMPLETE | - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &wavelan_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -4904,6 +4898,7 @@ static struct pcmcia_driver wavelan_driv .name = "wavelan_cs", }, .attach = wavelan_attach, + .event = wavelan_event, .detach = wavelan_detach, .id_table = wavelan_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/3c589_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/3c589_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/3c589_cs.c @@ -226,11 +226,6 @@ static dev_link_t *tc589_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &tc589_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -1074,6 +1069,7 @@ static struct pcmcia_driver tc589_driver .name = "3c589_cs", }, .attach = tc589_attach, + .event = tc589_event, .detach = tc589_detach, .id_table = tc589_ids, }; Index: 2.6.12-git10/drivers/scsi/pcmcia/qlogic_stub.c =================================================================== --- 2.6.12-git10.orig/drivers/scsi/pcmcia/qlogic_stub.c +++ 2.6.12-git10/drivers/scsi/pcmcia/qlogic_stub.c @@ -194,8 +194,6 @@ static dev_link_t *qlogic_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.event_handler = &qlogic_event; - client_reg.EventMask = CS_EVENT_RESET_REQUEST | CS_EVENT_CARD_RESET | CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -423,6 +421,7 @@ static struct pcmcia_driver qlogic_cs_dr .name = "qlogic_cs", }, .attach = qlogic_attach, + .event = qlogic_event, .detach = qlogic_detach, .id_table = qlogic_ids, }; Index: 2.6.12-git10/drivers/net/wireless/atmel_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/atmel_cs.c +++ 2.6.12-git10/drivers/net/wireless/atmel_cs.c @@ -218,11 +218,6 @@ static dev_link_t *atmel_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &atmel_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -668,12 +663,13 @@ static struct pcmcia_device_id atmel_ids MODULE_DEVICE_TABLE(pcmcia, atmel_ids); static struct pcmcia_driver atmel_driver = { - .owner = THIS_MODULE, - .drv = { - .name = "atmel_cs", + .owner = THIS_MODULE, + .drv = { + .name = "atmel_cs", }, - .attach = atmel_attach, - .detach = atmel_detach, + .attach = atmel_attach, + .event = atmel_event, + .detach = atmel_detach, .id_table = atmel_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/axnet_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/axnet_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/axnet_cs.c @@ -181,11 +181,6 @@ static dev_link_t *axnet_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &axnet_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -884,6 +879,7 @@ static struct pcmcia_driver axnet_cs_dri .name = "axnet_cs", }, .attach = axnet_attach, + .event = axnet_event, .detach = axnet_detach, .id_table = axnet_ids, }; Index: 2.6.12-git10/include/pcmcia/ds.h =================================================================== --- 2.6.12-git10.orig/include/pcmcia/ds.h +++ 2.6.12-git10/include/pcmcia/ds.h @@ -133,6 +133,8 @@ struct pcmcia_socket; struct pcmcia_driver { dev_link_t *(*attach)(void); + int (*event) (event_t event, int priority, + event_callback_args_t *); void (*detach)(dev_link_t *); struct module *owner; struct pcmcia_device_id *id_table; @@ -159,15 +161,13 @@ struct pcmcia_device { /* deprecated, a cleaned up version will be moved into this struct soon */ dev_link_t *instance; + event_callback_args_t event_callback_args; + struct client_t { u_short client_magic; struct pcmcia_socket *Socket; u_char Function; u_int state; - event_t EventMask; - int (*event_handler) (event_t event, int priority, - event_callback_args_t *); - event_callback_args_t event_callback_args; } client; /* information about this device */ Index: 2.6.12-git10/drivers/isdn/hisax/teles_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/isdn/hisax/teles_cs.c +++ 2.6.12-git10/drivers/isdn/hisax/teles_cs.c @@ -193,11 +193,6 @@ static dev_link_t *teles_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &teles_cs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -501,6 +496,7 @@ static struct pcmcia_driver teles_cs_dri .name = "teles_cs", }, .attach = teles_attach, + .event = teles_cs_event, .detach = teles_detach, .id_table = teles_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/xirc2ps_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/xirc2ps_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/xirc2ps_cs.c @@ -619,11 +619,6 @@ xirc2ps_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &xirc2ps_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; if ((err = pcmcia_register_client(&link->handle, &client_reg))) { @@ -2016,6 +2011,7 @@ static struct pcmcia_driver xirc2ps_cs_d .name = "xirc2ps_cs", }, .attach = xirc2ps_attach, + .event = xirc2ps_event, .detach = xirc2ps_detach, .id_table = xirc2ps_ids, }; Index: 2.6.12-git10/drivers/serial/serial_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/serial/serial_cs.c +++ 2.6.12-git10/drivers/serial/serial_cs.c @@ -232,11 +232,6 @@ static dev_link_t *serial_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &serial_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -883,6 +878,7 @@ static struct pcmcia_driver serial_cs_dr .name = "serial_cs", }, .attach = serial_attach, + .event = serial_event, .detach = serial_detach, .id_table = serial_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/nmclan_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/nmclan_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/nmclan_cs.c @@ -502,11 +502,6 @@ static dev_link_t *nmclan_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &nmclan_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -1688,6 +1683,7 @@ static struct pcmcia_driver nmclan_cs_dr .name = "nmclan_cs", }, .attach = nmclan_attach, + .event = nmclan_event, .detach = nmclan_detach, .id_table = nmclan_ids, }; Index: 2.6.12-git10/drivers/scsi/pcmcia/aha152x_stub.c =================================================================== --- 2.6.12-git10.orig/drivers/scsi/pcmcia/aha152x_stub.c +++ 2.6.12-git10/drivers/scsi/pcmcia/aha152x_stub.c @@ -134,11 +134,6 @@ static dev_link_t *aha152x_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.event_handler = &aha152x_event; - client_reg.EventMask = - CS_EVENT_RESET_REQUEST | CS_EVENT_CARD_RESET | - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -334,6 +329,7 @@ static struct pcmcia_driver aha152x_cs_d .name = "aha152x_cs", }, .attach = aha152x_attach, + .event = aha152x_event, .detach = aha152x_detach, .id_table = aha152x_ids, }; Index: 2.6.12-git10/drivers/isdn/hisax/sedlbauer_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/isdn/hisax/sedlbauer_cs.c +++ 2.6.12-git10/drivers/isdn/hisax/sedlbauer_cs.c @@ -226,11 +226,6 @@ static dev_link_t *sedlbauer_attach(void link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &sedlbauer_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -634,6 +629,7 @@ static struct pcmcia_driver sedlbauer_dr .name = "sedlbauer_cs", }, .attach = sedlbauer_attach, + .event = sedlbauer_event, .detach = sedlbauer_detach, .id_table = sedlbauer_ids, }; Index: 2.6.12-git10/drivers/parport/parport_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/parport/parport_cs.c +++ 2.6.12-git10/drivers/parport/parport_cs.c @@ -133,11 +133,6 @@ static dev_link_t *parport_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &parport_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -386,6 +381,7 @@ static struct pcmcia_driver parport_cs_d .name = "parport_cs", }, .attach = parport_attach, + .event = parport_event, .detach = parport_detach, .id_table = parport_ids, Index: 2.6.12-git10/drivers/mtd/maps/pcmciamtd.c =================================================================== --- 2.6.12-git10.orig/drivers/mtd/maps/pcmciamtd.c +++ 2.6.12-git10/drivers/mtd/maps/pcmciamtd.c @@ -800,11 +800,6 @@ static dev_link_t *pcmciamtd_attach(void /* Register with Card Services */ client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &pcmciamtd_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; DEBUG(2, "Calling RegisterClient"); @@ -850,6 +845,7 @@ static struct pcmcia_driver pcmciamtd_dr .name = "pcmciamtd" }, .attach = pcmciamtd_attach, + .event = pcmciamtd_event, .detach = pcmciamtd_detach, .owner = THIS_MODULE, .id_table = pcmciamtd_ids, Index: 2.6.12-git10/sound/pcmcia/vx/vx_entry.c =================================================================== --- 2.6.12-git10.orig/sound/pcmcia/vx/vx_entry.c +++ 2.6.12-git10/sound/pcmcia/vx/vx_entry.c @@ -35,7 +35,6 @@ MODULE_LICENSE("GPL"); * prototypes */ static void vxpocket_config(dev_link_t *link); -static int vxpocket_event(event_t event, int priority, event_callback_args_t *args); static void vxpocket_release(dev_link_t *link) @@ -169,14 +168,6 @@ dev_link_t *snd_vxpocket_attach(struct s /* Register with Card Services */ memset(&client_reg, 0, sizeof(client_reg)); client_reg.dev_info = hw->dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL -#ifdef CONFIG_PM - | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET - | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME -#endif - ; - client_reg.event_handler = &vxpocket_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -321,7 +312,7 @@ failed: /* * event callback */ -static int vxpocket_event(event_t event, int priority, event_callback_args_t *args) +int vxpocket_event(event_t event, int priority, event_callback_args_t *args) { dev_link_t *link = args->client_data; vx_core_t *chip = link->priv; @@ -380,4 +371,5 @@ static int vxpocket_event(event_t event, */ EXPORT_SYMBOL(snd_vxpocket_ops); EXPORT_SYMBOL(snd_vxpocket_attach); +EXPORT_SYMBOL(vxpocket_event); EXPORT_SYMBOL(snd_vxpocket_detach); Index: 2.6.12-git10/drivers/bluetooth/bt3c_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/bluetooth/bt3c_cs.c +++ 2.6.12-git10/drivers/bluetooth/bt3c_cs.c @@ -696,11 +696,6 @@ static dev_link_t *bt3c_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &bt3c_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -947,6 +942,7 @@ static struct pcmcia_driver bt3c_driver .name = "bt3c_cs", }, .attach = bt3c_attach, + .event = bt3c_event, .detach = bt3c_detach, .id_table = bt3c_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/smc91c92_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/smc91c92_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/smc91c92_cs.c @@ -370,10 +370,6 @@ static dev_link_t *smc91c92_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &smc91c92_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -2365,6 +2361,7 @@ static struct pcmcia_driver smc91c92_cs_ .name = "smc91c92_cs", }, .attach = smc91c92_attach, + .event = smc91c92_event, .detach = smc91c92_detach, .id_table = smc91c92_ids, }; Index: 2.6.12-git10/sound/pcmcia/pdaudiocf/pdaudiocf.c =================================================================== --- 2.6.12-git10.orig/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ 2.6.12-git10/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -171,14 +171,6 @@ static dev_link_t *snd_pdacf_attach(void /* Register with Card Services */ client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL -#ifdef CONFIG_PM - | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET - | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME -#endif - ; - client_reg.event_handler = &pdacf_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -387,12 +379,13 @@ static struct pcmcia_device_id snd_pdacf MODULE_DEVICE_TABLE(pcmcia, snd_pdacf_ids); static struct pcmcia_driver pdacf_cs_driver = { - .owner = THIS_MODULE, - .drv = { - .name = "snd-pdaudiocf", + .owner = THIS_MODULE, + .drv = { + .name = "snd-pdaudiocf", }, - .attach = snd_pdacf_attach, - .detach = snd_pdacf_detach, + .attach = snd_pdacf_attach, + .event = pdacf_event, + .detach = snd_pdacf_detach, .id_table = snd_pdacf_ids, }; Index: 2.6.12-git10/drivers/bluetooth/dtl1_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/bluetooth/dtl1_cs.c +++ 2.6.12-git10/drivers/bluetooth/dtl1_cs.c @@ -594,11 +594,6 @@ static dev_link_t *dtl1_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &dtl1_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -820,6 +815,7 @@ static struct pcmcia_driver dtl1_driver .name = "dtl1_cs", }, .attach = dtl1_attach, + .event = dtl1_event, .detach = dtl1_detach, .id_table = dtl1_ids, }; Index: 2.6.12-git10/drivers/bluetooth/btuart_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/bluetooth/btuart_cs.c +++ 2.6.12-git10/drivers/bluetooth/btuart_cs.c @@ -615,11 +615,6 @@ static dev_link_t *btuart_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &btuart_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -867,6 +862,7 @@ static struct pcmcia_driver btuart_drive .name = "btuart_cs", }, .attach = btuart_attach, + .event = btuart_event, .detach = btuart_detach, .id_table = btuart_ids, }; Index: 2.6.12-git10/drivers/net/wireless/ray_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/ray_cs.c +++ 2.6.12-git10/drivers/net/wireless/ray_cs.c @@ -393,11 +393,6 @@ static dev_link_t *ray_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &ray_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -2916,6 +2911,7 @@ static struct pcmcia_driver ray_driver = .name = "ray_cs", }, .attach = ray_attach, + .event = ray_event, .detach = ray_detach, .id_table = ray_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/pcnet_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/pcnet_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/pcnet_cs.c @@ -276,11 +276,6 @@ static dev_link_t *pcnet_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &pcnet_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -1844,6 +1839,7 @@ static struct pcmcia_driver pcnet_driver .name = "pcnet_cs", }, .attach = pcnet_attach, + .event = pcnet_event, .detach = pcnet_detach, .owner = THIS_MODULE, .id_table = pcnet_ids, Index: 2.6.12-git10/drivers/net/wireless/orinoco_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/orinoco_cs.c +++ 2.6.12-git10/drivers/net/wireless/orinoco_cs.c @@ -186,11 +186,6 @@ orinoco_cs_attach(void) dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &orinoco_cs_event; client_reg.Version = 0x0210; /* FIXME: what does this mean? */ client_reg.event_callback_args.client_data = link; @@ -664,6 +659,7 @@ static struct pcmcia_driver orinoco_driv .name = DRIVER_NAME, }, .attach = orinoco_cs_attach, + .event = orinoco_cs_event, .detach = orinoco_cs_detach, .id_table = orinoco_cs_ids, }; Index: 2.6.12-git10/drivers/isdn/hardware/avm/avm_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/isdn/hardware/avm/avm_cs.c +++ 2.6.12-git10/drivers/isdn/hardware/avm/avm_cs.c @@ -161,11 +161,6 @@ static dev_link_t *avmcs_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &avmcs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -500,6 +495,7 @@ static struct pcmcia_driver avmcs_driver .name = "avm_cs", }, .attach = avmcs_attach, + .event = avmcs_event, .detach = avmcs_detach, .id_table = avmcs_ids, }; Index: 2.6.12-git10/drivers/isdn/hisax/elsa_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/isdn/hisax/elsa_cs.c +++ 2.6.12-git10/drivers/isdn/hisax/elsa_cs.c @@ -212,11 +212,6 @@ static dev_link_t *elsa_cs_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &elsa_cs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -521,6 +516,7 @@ static struct pcmcia_driver elsa_cs_driv .name = "elsa_cs", }, .attach = elsa_cs_attach, + .event = elsa_cs_event, .detach = elsa_cs_detach, .id_table = elsa_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/fmvj18x_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/fmvj18x_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/fmvj18x_cs.c @@ -288,11 +288,6 @@ static dev_link_t *fmvj18x_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &fmvj18x_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -797,6 +792,7 @@ static struct pcmcia_driver fmvj18x_cs_d .name = "fmvj18x_cs", }, .attach = fmvj18x_attach, + .event = fmvj18x_event, .detach = fmvj18x_detach, .id_table = fmvj18x_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/ibmtr_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/ibmtr_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/ibmtr_cs.c @@ -190,11 +190,6 @@ static dev_link_t *ibmtr_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &ibmtr_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -521,6 +516,7 @@ static struct pcmcia_driver ibmtr_cs_dri .name = "ibmtr_cs", }, .attach = ibmtr_attach, + .event = ibmtr_event, .detach = ibmtr_detach, .id_table = ibmtr_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/3c574_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/3c574_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/3c574_cs.c @@ -312,11 +312,6 @@ static dev_link_t *tc574_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &tc574_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -1299,6 +1294,7 @@ static struct pcmcia_driver tc574_driver .name = "3c574_cs", }, .attach = tc574_attach, + .event = tc574_event, .detach = tc574_detach, .id_table = tc574_ids, }; Index: 2.6.12-git10/drivers/net/pcmcia/com20020_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/pcmcia/com20020_cs.c +++ 2.6.12-git10/drivers/net/pcmcia/com20020_cs.c @@ -200,11 +200,6 @@ static dev_link_t *com20020_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &com20020_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -495,6 +490,7 @@ static struct pcmcia_driver com20020_cs_ .name = "com20020_cs", }, .attach = com20020_attach, + .event = com20020_event, .detach = com20020_detach, .id_table = com20020_ids, }; Index: 2.6.12-git10/drivers/char/pcmcia/synclink_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/char/pcmcia/synclink_cs.c +++ 2.6.12-git10/drivers/char/pcmcia/synclink_cs.c @@ -593,11 +593,6 @@ static dev_link_t *mgslpc_attach(void) dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &mgslpc_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; @@ -3093,6 +3088,7 @@ static struct pcmcia_driver mgslpc_drive .name = "synclink_cs", }, .attach = mgslpc_attach, + .event = mgslpc_event, .detach = mgslpc_detach, .id_table = mgslpc_ids, }; Index: 2.6.12-git10/drivers/scsi/pcmcia/nsp_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/scsi/pcmcia/nsp_cs.c +++ 2.6.12-git10/drivers/scsi/pcmcia/nsp_cs.c @@ -1642,11 +1642,6 @@ static dev_link_t *nsp_cs_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME ; - client_reg.event_handler = &nsp_cs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -2138,12 +2133,13 @@ static struct pcmcia_device_id nsp_cs_id MODULE_DEVICE_TABLE(pcmcia, nsp_cs_ids); static struct pcmcia_driver nsp_driver = { - .owner = THIS_MODULE, - .drv = { - .name = "nsp_cs", + .owner = THIS_MODULE, + .drv = { + .name = "nsp_cs", }, - .attach = nsp_cs_attach, - .detach = nsp_cs_detach, + .attach = nsp_cs_attach, + .event = nsp_cs_event, + .detach = nsp_cs_detach, .id_table = nsp_cs_ids, }; #endif Index: 2.6.12-git10/drivers/net/wireless/wl3501_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/wl3501_cs.c +++ 2.6.12-git10/drivers/net/wireless/wl3501_cs.c @@ -2005,13 +2005,6 @@ static dev_link_t *wl3501_attach(void) link->next = wl3501_dev_list; wl3501_dev_list = link; client_reg.dev_info = &wl3501_dev_info; - client_reg.EventMask = CS_EVENT_CARD_INSERTION | - CS_EVENT_RESET_PHYSICAL | - CS_EVENT_CARD_RESET | - CS_EVENT_CARD_REMOVAL | - CS_EVENT_PM_SUSPEND | - CS_EVENT_PM_RESUME; - client_reg.event_handler = wl3501_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -2246,12 +2239,13 @@ static struct pcmcia_device_id wl3501_id MODULE_DEVICE_TABLE(pcmcia, wl3501_ids); static struct pcmcia_driver wl3501_driver = { - .owner = THIS_MODULE, - .drv = { - .name = "wl3501_cs", + .owner = THIS_MODULE, + .drv = { + .name = "wl3501_cs", }, - .attach = wl3501_attach, - .detach = wl3501_detach, + .attach = wl3501_attach, + .event = wl3501_event, + .detach = wl3501_detach, .id_table = wl3501_ids, }; Index: 2.6.12-git10/drivers/net/wireless/netwave_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/netwave_cs.c +++ 2.6.12-git10/drivers/net/wireless/netwave_cs.c @@ -491,11 +491,6 @@ static dev_link_t *netwave_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &netwave_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -1680,6 +1675,7 @@ static struct pcmcia_driver netwave_driv .name = "netwave_cs", }, .attach = netwave_attach, + .event = netwave_event, .detach = netwave_detach, .id_table = netwave_ids, }; Index: 2.6.12-git10/drivers/net/wireless/airo_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/net/wireless/airo_cs.c +++ 2.6.12-git10/drivers/net/wireless/airo_cs.c @@ -210,11 +210,6 @@ static dev_link_t *airo_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &airo_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -574,6 +569,7 @@ static struct pcmcia_driver airo_driver .name = "airo_cs", }, .attach = airo_attach, + .event = airo_event, .detach = airo_detach, .id_table = airo_ids, }; Index: 2.6.12-git10/drivers/ide/legacy/ide-cs.c =================================================================== --- 2.6.12-git10.orig/drivers/ide/legacy/ide-cs.c +++ 2.6.12-git10/drivers/ide/legacy/ide-cs.c @@ -134,11 +134,6 @@ static dev_link_t *ide_attach(void) link->next = dev_list; dev_list = link; client_reg.dev_info = &dev_info; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &ide_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -497,6 +492,7 @@ static struct pcmcia_driver ide_cs_drive .name = "ide-cs", }, .attach = ide_attach, + .event = ide_event, .detach = ide_detach, .id_table = ide_ids, }; Index: 2.6.12-git10/drivers/usb/host/sl811_cs.c =================================================================== --- 2.6.12-git10.orig/drivers/usb/host/sl811_cs.c +++ 2.6.12-git10/drivers/usb/host/sl811_cs.c @@ -389,11 +389,6 @@ static dev_link_t *sl811_cs_attach(void) dev_list = link; client_reg.dev_info = (dev_info_t *) &driver_name; client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE; - client_reg.EventMask = - CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | - CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | - CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; - client_reg.event_handler = &sl811_cs_event; client_reg.Version = 0x0210; client_reg.event_callback_args.client_data = link; ret = pcmcia_register_client(&link->handle, &client_reg); @@ -418,6 +413,7 @@ static struct pcmcia_driver sl811_cs_dri .name = (char *)driver_name, }, .attach = sl811_cs_attach, + .event = sl811_cs_event, .detach = sl811_cs_detach, .id_table = sl811_ids, };