HPSB_ALLOC_HOST

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

hpsb_alloc_host - allocate a new host controller.  

SYNOPSIS

"SYNOPSIS"

struct hpsb_host * hpsb_alloc_host (struct hpsb_host_driver * drv, size_t extra);  

ARGUMENTS

drv
the driver that will manage the host controller
extra
number of extra bytes to allocate for the driver
 

DESCRIPTION

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 extra parameter. Once allocated, the driver should initialize the driver specific parts, enable the controller and make it available to the general subsystem using hpsb_add_host.

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 hpsb_unref_host.  

RETURN VALUE

a pointer to the &hpsb_host if succesful, NULL if no memory was available.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
RETURN VALUE

This document was created by man2html, using the manual pages.
Time: 04:40:47 GMT, October 06, 2005