.\" 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" "" "06 October 2005" "" ""
.SH NAME
parport_register_driver \- register a parallel port device driver
.SH SYNOPSIS
"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.