Unregistering The Card From The Hardware Management Database; Freeing Resources - Compaq Tru64 UNIX Installation Manual

Writing network device drivers
Table of Contents

Advertisement

7.10 Unregistering the Card from the Hardware
Management Database
The following code shows how the el_unattach( ) routine unregisters the
card from the hardware management database:
lan_ehm_free(&sc->ehm);
Frees up any memory allocated for enhanced hardware management
1
and unregisters this card from the hardware management database.

7.11 Freeing Resources

The following code shows how the el_unattach( ) routine frees data
structures and memory that the adapter uses:
FREE(sc, M_DEVBUF);
el_softc[unit] = NULL;
el_info[unit] = NULL;
el_configured--;
return (ESUCCESS);
}
Frees all memory that the adapter uses, and returns ESUCCESS to
1
indicate that the unattach operation completed successfully.
1
1
Implementing the unattach Routine 7–5

Advertisement

Table of Contents
loading

Table of Contents