'\" te .\" Copyright (c) 2005, 4Front Technologies 2005\&. .TH ossddk_disable_device 9ossddk "12 Sep 2005" "SunOS 5.10" "OSS DDK Services" .SH "NAME" ossddk_disable_device \- Disables the device if possible prior unloading the driver .PP .SH "SYNOPSIS" .nf #include .LP #include .fi .LP \fBint\fR ossddk_disable_device(\fBoss_device_t *\fIosdev\fP); .PP .SH "INTERFACE LEVEL" .PP Open Sound System specific (OSS 4.0 DDK)\&. .PP .SH "ARGUMENTS" .PP .sp .ne 2 .mk \fB\fIosdev\fR .in +16n .rt OSS device handle. .in -16n .PP .SH "DESCRIPTION" .PP Drivers should call \fIossddk_disable_device\fR function in the beginning of their detach routine. This function checks if the driver can be safely unloaded and prevents OSS from accessing the driver any more. .PP .SH "RETURN VALUES" This function returns a negative value (-errno) if the device cannot be disabled at this moment. In this case the driver should refuse to detach. Value of 0 means that the device was successfully disabled and the driver can proceed the detach operation. .PP .SH "SEE ALSO" .PP \fIWriting Sound Device Drivers with OSS DDK\fR \fIOpen Sound System Programmer's Guide\fR