*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> bus_release_resource (9)              
Title
Content
Arch
Section
 

Contents


BUS_RELEASE_RESOURC... FreeBSD Kernel Developer's ManualBUS_RELEASE_RESOURC...

NAME    [Toc]    [Back]

     bus_release_resource -- release resources on a bus

SYNOPSIS    [Toc]    [Back]

     #include <sys/param.h>
     #include <sys/bus.h>

     #include <machine/bus.h>
     #include <sys/rman.h>
     #include <machine/resource.h>

     int
     bus_release_resource(device_t dev, int type, int rid,
	 struct resource *r);

DESCRIPTION    [Toc]    [Back]

     Free a resource allocated by bus_alloc_resource(9).  The resource must
     not be in use on release, i.e. call an appropriate function before (e.g.
     bus_teardown_intr(9) for IRQs).

     dev is the device that owns the resource.

     type is the type of resource that is released.  It must be of the same
     type you allocated it as before.  See bus_alloc_resource(9) for valid
     types.

     rid is the resource ID of the resource.  The rid value must be the same
     as the one returned by bus_alloc_resource(9).

     r is the pointer to struct res, i.e. the resource itself, returned by
     bus_alloc_resource(9).

RETURN VALUES    [Toc]    [Back]

     EINVAL is returned, if the device dev has no parent, 0 otherwise.	The
     kernel will panic, if it can't release the resource.

EXAMPLES    [Toc]    [Back]

	     /* deactivate IRQ */
	     bus_teardown_intr(dev, foosoftc->irqres, foosoftc->irqid);

	     /* release IRQ resource */
	     bus_release_resource(dev, SYS_RES_IRQ, foosoftc->irqid,
		     foosoftc->irqres);

	     /* release I/O port resource */
	     bus_release_resource(dev, SYS_RES_IOPORT, foosoftc->portid,
		     foosoftc->portres);

SEE ALSO    [Toc]    [Back]

      
      
     bus_alloc_resource(9), device(9), driver(9)

AUTHORS    [Toc]    [Back]

     This man page was written by Alexander Langer <[email protected]>.


FreeBSD 5.2.1			 May 18, 2000			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
pmap_release FreeBSD release resources held by a physical map
glresources IRIX X resources used by GL programs
SgTextField IRIX XmText SGI Resources
SgText IRIX XmText SGI Resources
bus_alloc_resource FreeBSD alloc resources on a bus
SgScale IRIX XmScale SGI Resources
alResources IRIX Audio Library resources
ssusage IRIX run a command, and print out the resources it used
cvusage IRIX run a command, and print out the resources it used
windres Linux manipulate Windows resources.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service