| 266 | } |
| 267 | |
| 268 | static int |
| 269 | smapi_detach (device_t dev) |
| 270 | { |
| 271 | struct smapi_softc *sc; |
| 272 | |
| 273 | sc = device_get_softc(dev); |
| 274 | |
| 275 | destroy_dev(sc->cdev); |
| 276 | |
| 277 | if (sc->res) |
| 278 | bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); |
| 279 | |
| 280 | return (0); |
| 281 | } |
| 282 | |
| 283 | static int |
| 284 | smapi_modevent (module_t mod, int what, void *arg) |
nothing calls this directly
no test coverage detected