1cefd51ecSDoug Rabson.\" -*- nroff -*- 2cefd51ecSDoug Rabson.\" 3cefd51ecSDoug Rabson.\" Copyright (c) 1998 Doug Rabson 4cefd51ecSDoug Rabson.\" 5cefd51ecSDoug Rabson.\" All rights reserved. 6cefd51ecSDoug Rabson.\" 7cefd51ecSDoug Rabson.\" This program is free software. 8cefd51ecSDoug Rabson.\" 9cefd51ecSDoug Rabson.\" Redistribution and use in source and binary forms, with or without 10cefd51ecSDoug Rabson.\" modification, are permitted provided that the following conditions 11cefd51ecSDoug Rabson.\" are met: 12cefd51ecSDoug Rabson.\" 1. Redistributions of source code must retain the above copyright 13cefd51ecSDoug Rabson.\" notice, this list of conditions and the following disclaimer. 14cefd51ecSDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright 15cefd51ecSDoug Rabson.\" notice, this list of conditions and the following disclaimer in the 16cefd51ecSDoug Rabson.\" documentation and/or other materials provided with the distribution. 17cefd51ecSDoug Rabson.\" 18cefd51ecSDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 19cefd51ecSDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20cefd51ecSDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21cefd51ecSDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 22cefd51ecSDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23cefd51ecSDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24cefd51ecSDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25cefd51ecSDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26cefd51ecSDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27cefd51ecSDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28cefd51ecSDoug Rabson.\" 29cefd51ecSDoug Rabson.Dd June 16, 1998 30cefd51ecSDoug Rabson.Dt DEVICE_DETACH 9 313d45e180SRuslan Ermilov.Os 32cefd51ecSDoug Rabson.Sh NAME 33cefd51ecSDoug Rabson.Nm DEVICE_DETACH 34cefd51ecSDoug Rabson.Nd detach a device 35cefd51ecSDoug Rabson.Sh SYNOPSIS 3632eef9aeSRuslan Ermilov.In sys/param.h 3732eef9aeSRuslan Ermilov.In sys/bus.h 38cefd51ecSDoug Rabson.Ft int 395ad5ff52SBruce Evans.Fn DEVICE_DETACH "device_t dev" 40cefd51ecSDoug Rabson.Sh DESCRIPTION 41cd367b32SHiten PandyaDetach a device. 42cd367b32SHiten PandyaThis can be called if the user is replacing the 43cefd51ecSDoug Rabsondriver software or if a device is about to be physically removed from 44dea25585SGiorgos Keramidasthe system (e.g.\& for 45dea25585SGiorgos Keramidas.Xr pccard 4 46dea25585SGiorgos Keramidasdevices). 47cefd51ecSDoug Rabson.Pp 48cefd51ecSDoug RabsonThe method should deallocate any system resources allocated during the 49cefd51ecSDoug Rabson.Xr DEVICE_ATTACH 9 505203edcdSRuslan Ermilovmethod and reset the hardware to a sane state (i.e., disable interrupts 51cefd51ecSDoug Rabsonetc.) 52cefd51ecSDoug Rabson.Sh RETURN VALUES 53cefd51ecSDoug RabsonZero is returned on success, otherwise an appropriate error is returned. 54cefd51ecSDoug Rabson.Sh SEE ALSO 55dea25585SGiorgos Keramidas.Xr pccard 4 , 56cefd51ecSDoug Rabson.Xr device 9 , 5726b10414SAlexander Langer.Xr DEVICE_ATTACH 9 , 5826b10414SAlexander Langer.Xr DEVICE_IDENTIFY 9 , 5926b10414SAlexander Langer.Xr DEVICE_PROBE 9 , 6026b10414SAlexander Langer.Xr DEVICE_SHUTDOWN 9 61cefd51ecSDoug Rabson.Sh AUTHORS 62571dba6eSHiten PandyaThis manual page was written by 63cefd51ecSDoug Rabson.An Doug Rabson . 64