Diff for /src/share/man/man9/bus_alloc_resource.9 between versions 1.2 and 1.3

version 1.2, 2003/06/17 04:37:01 version 1.3, 2004/05/05 16:57:11
Line 26 Line 26
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF  .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"  .\"
.\" $FreeBSD: src/share/man/man9/bus_alloc_resource.9,v 1.2.2.9 2001/12/17 11:30:18 ru Exp $.\" $FreeBSD: src/share/man/man9/bus_alloc_resource.9,v 1.2.2.10 2004/03/17 17:54:24 njl Exp $
.\" $DragonFly: src/share/man/man9/bus_alloc_resource.9,v 1.1 2003/06/16 05:37:30 dillon Exp $.\" $DragonFly$
 .\"  .\"
 .Dd May 18, 2000  .Dd May 18, 2000
 .Dt BUS_ALLOC_RESOURCE 9  .Dt BUS_ALLOC_RESOURCE 9
 .Os  .Os
 .Sh NAME  .Sh NAME
.Nm bus_alloc_resource.Nm bus_alloc_resource ,
 .Nm bus_alloc_resource_any
 .Nd alloc resources on a bus  .Nd alloc resources on a bus
 .Sh SYNOPSIS  .Sh SYNOPSIS
 .In sys/param.h  .In sys/param.h
Line 44 Line 45
 .In machine/resource.h  .In machine/resource.h
 .Ft struct resource *  .Ft struct resource *
 .Fn bus_alloc_resource "device_t dev" "int type" "int *rid" "u_long start" "u_long end" "u_long count" "u_int flags"  .Fn bus_alloc_resource "device_t dev" "int type" "int *rid" "u_long start" "u_long end" "u_long count" "u_int flags"
   .Ft struct resource *
   .Fn bus_alloc_resource_any "device_t dev" "int type" "int *rid" "u_int flags"
 .Sh DESCRIPTION  .Sh DESCRIPTION
 This is an easy interface to the resource-management functions.  This is an easy interface to the resource-management functions.
 It hides the indirection through the parent's method table.  It hides the indirection through the parent's method table.
 This function generally should be called in attach, but (except in some  This function generally should be called in attach, but (except in some
 race cases) never earlier.  race cases) never earlier.
 .Pp  .Pp
Its arguments are as follows:The
 .Fn bus_alloc_resource_any
 function is a convenience wrapper for
 .Fn bus_alloc_resource .
 It sets the values for
 .Fa start ,
 .Fa end ,
 and
 .Fa count
 to the default resource (see description of
 .Fa start
 below).
 .Pp
 The arguments are as follows:
 .Bl -item  .Bl -item
 .It  .It
 .Fa dev  .Fa dev
Line 145  should be saved in the softc of the devi Line 161  should be saved in the softc of the devi
         irqid = 0;          irqid = 0;
         portres = bus_alloc_resource(dev, SYS_RES_IOPORT, &portid,          portres = bus_alloc_resource(dev, SYS_RES_IOPORT, &portid,
                         0ul, ~0ul, 32, RF_ACTIVE);                          0ul, ~0ul, 32, RF_ACTIVE);
        irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &irqid,        irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irqid,
                        0ul, ~0ul, 1, RF_ACTIVE | RF_SHAREABLE);                        RF_ACTIVE | RF_SHAREABLE);
 .Ed  .Ed
 .Sh SEE ALSO  .Sh SEE ALSO
 .Xr bus_release_resource 9 ,  .Xr bus_release_resource 9 ,

Removed from v.1.2  
changed lines
  Added in v.1.3