device_close.html   [plain text]

<strong>Function</strong> - De-establish a connection to a device.
<strong>#include&lt device/device.h&gt</strong>

<strong>kern_return_t	device_close</strong>
		<strong>(mach_port_t</strong>	<var>device</var><strong>);</strong>
<dt> <var>device</var> 
[in device send right]
A device port to the device to be closed.
The <strong>device_close</strong> function destroys the associated device
port.  The open count 
for the named device is decremented.  If this count reaches zero, the close
operation of the device driver is invoked, closing the device.
<strong>device_close</strong> will destroy any mapped device windows
obtained through this
device port.
<dt> <strong>D_NO_SUCH_DEVICE</strong>
No device with that name, or the device is not operational.
<a href="device_open.html"><strong>device_open</strong></a>.