I've never coded a device but I'd say that the expunge procedure will be similar to (if not the same as) that of a library.
Normally, in the expunge function you should check the library instance counter (lib_OpenCnt), and if it is > 0, set lib_Flags |= LIBF_DELEXP and return 0 (LIBF_DELEXP stands for delayed expunge: something else is still using the library, so we can't expunge right now). If the counter == 0, you do your library cleanup, then IExec->Remove() from the system library list, and IExec->DeleteLibrary().
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition