'\" t .\" Title: parport_register_port .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Parallel Port Devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "PARPORT_REGISTER_POR" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Parallel Port Devices" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" parport_register_port \- register a parallel port .SH "SYNOPSIS" .HP \w'struct\ parport\ *\ parport_register_port('u .BI "struct parport * parport_register_port(unsigned\ long\ " "base" ", int\ " "irq" ", int\ " "dma" ", struct\ parport_operations\ *\ " "ops" ");" .SH "ARGUMENTS" .PP \fIbase\fR .RS 4 base I/O address .RE .PP \fIirq\fR .RS 4 IRQ line .RE .PP \fIdma\fR .RS 4 DMA channel .RE .PP \fIops\fR .RS 4 pointer to the port driver\*(Aqs port operations structure .RE .SH "DESCRIPTION" .PP When a parallel port (lowlevel) driver finds a port that should be made available to parallel port device drivers, it should call \fBparport_register_port\fR\&. The \fIbase\fR, \fIirq\fR, and \fIdma\fR parameters are for the convenience of port drivers, and for ports where they aren\*(Aqt meaningful needn\*(Aqt be set to anything special\&. They can be altered afterwards by adjusting the relevant members of the parport structure that is returned and represents the port\&. They should not be tampered with after calling parport_announce_port, however\&. .PP If there are parallel port device drivers in the system that have registered themselves using \fBparport_register_driver\fR, they are not told about the port at this time; that is done by \fBparport_announce_port\fR\&. .PP The \fIops\fR structure is allocated by the caller, and must not be deallocated before calling \fBparport_remove_port\fR\&. .PP If there is no memory to allocate a new parport structure, this function will return \fBNULL\fR\&. .SH "COPYRIGHT" .br