11 freeing resources – Compaq TRU64 AA-RNG2A-TE User Manual

Page 99

Advertising
background image

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);

1

1

Frees up any memory allocated for enhanced hardware management
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);

1

el_softc[unit] = NULL;

el_info[unit] = NULL;

el_configured--;

return (ESUCCESS);

}

1

Frees all memory that the adapter uses, and returns ESUCCESS to
indicate that the unattach operation completed successfully.

Implementing the unattach Routine 7–5

Advertising