
7.6 Unregistering the PCMCIA Event Callback Routine
The following code shows how the el_unattach( ) routine unregisters the PCMCIA event callback routine:
if
1
CARD_REMOVAL_EVENT, (caddr_t)el_card_remove);
1
For PCMCIA versions of the card, directs the bus code not to return notification if the card has been removed.
7.7 Stopping the Polling Process
The following code shows how the el_unattach( ) routine stops the polling process:
s = splimp();
if (el_polling &&
}
2
1
2
3
Stops the polling process if polling had originally been requested by the user.
Removes the scheduled event from the system’s timer queue.
Sets the polling_flag member to 0 (false) to indicate that polling has stopped.
7.8 Unregistering the Shutdown Routine
The following code shows how the el_unattach( ) routine unregisters the shutdown routine:
drvr_register_shutdown(el_shutdown, (void*)sc, DRVR_UNREGISTER);
1
1
Unregisters the shutdown routine, which was registered during the probe operation.
7.9 Terminating the Simple Lock
The following code shows how the el_unattach( ) routine terminates the softc lock:
1
1
Frees up the softc lock.