Function - De-establish a connection to a device.
#include< device/device.h> kern_return_t device_close (mach_port_t device);
The device_close 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.
device_close will destroy any mapped device windows obtained through this device port.