.\" 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 "HPSB_ALLOC_HOST" "" "06 October 2005" "" ""
.SH NAME
hpsb_alloc_host \- allocate a new host controller.
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct hpsb_host * hpsb_alloc_host (struct hpsb_host_driver * \fIdrv\fB, size_t \fIextra\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIdrv\fB\fR
the driver that will manage the host controller
.TP
\fB\fIextra\fB\fR
number of extra bytes to allocate for the driver
.SH "DESCRIPTION"
.PP
Allocate a &hpsb_host and initialize the general subsystem specific
fields. If the driver needs to store per host data, as drivers
usually do, the amount of memory required can be specified by the
\fIextra\fR parameter. Once allocated, the driver should initialize the
driver specific parts, enable the controller and make it available
to the general subsystem using \fBhpsb_add_host\fR\&.
.PP
The &hpsb_host is allocated with an single initial reference
belonging to the driver. Once the driver is done with the struct,
for example, when the driver is unloaded, it should release this
reference using \fBhpsb_unref_host\fR\&.
.SH "RETURN VALUE"
.PP
a pointer to the &hpsb_host if succesful, NULL if
no memory was available.