summaryrefslogtreecommitdiff
path: root/misc/man9ossddk/ossddk_disable_device.9ossddk
blob: ea2bde6e874c653034b086483189e19145823250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'\" 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 <sys/soundcard.h>
.LP
#include <sys/ossddk/ossddk.h>
.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