#include <sys/sunddi.h>
void prefixmapdev_free(ddi_mapdev_handle_t handle, void *devprivate);
Solaris DDI specific (Solaris DDI).
mapdev_free() is called when a mapping created by ddi_mapdev(9F) is being destroyed. mapdev_free() receives the handle of the mapping being destroyed and a pointer to the driver private data for this mapping in devprivate.
The mapdev_free() routine is expected to free any resources that were allocated by the driver for this mapping.
static void xxmapdev_free(ddi_mapdev_handle_t hdl, void *pvtdata) { /* Destroy the driver private data - Device dependent */ ... kmem_free(pvtdata, sizeof (struct xxpvtdata)); }