.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "PARPORT_REGISTER_DRIVER" "9" "17 July 2003" "" ""
.SH NAME
parport_register_driver \- register a parallel port device driver
.SH SYNOPSIS
.sp
\fB
.sp
int parport_register_driver (struct parport_driver * \fIdrv\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIdrv\fB\fR
structure describing the driver
.SH "DESCRIPTION"
.PP
This can be called by a parallel port device driver in order
to receive notifications about ports being found in the
system, as well as ports no longer available.
.PP
The \fIdrv\fR structure is allocated by the caller and must not be
deallocated until after calling \fBparport_unregister_driver\fR.
.PP
The driver's \fBattach\fR function may block. The port that
\fBattach\fR is given will be valid for the duration of the
callback, but if the driver wants to take a copy of the
pointer it must call \fBparport_get_port\fR to do so. Calling
\fBparport_register_device\fR on that port will do this for you.
.PP
The driver's \fBdetach\fR function may not block. The port that
\fBdetach\fR is given will be valid for the duration of the
callback, but if the driver wants to take a copy of the
pointer it must call \fBparport_get_port\fR to do so.
.PP
Returns 0 on success. Currently it always succeeds.
.SH "ABOUT THIS DOCUMENT"
.PP
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, with no Front-Cover Texts,
and with no Back-Cover Texts. A copy of the license is included
in the section entitled "GNU Free Documentation License".
.PP
If you have comments on the formatting of this manpage, then please contact
Michael Still (mikal@stillhq.com).
.PP
This documentation was generated with kernel version 2.5.73.