diff options
author | Tejun Heo <htejun@gmail.com> | 2007-01-20 16:00:26 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 17:39:36 -0500 |
commit | 9ac7849e35f705830f7b016ff272b0ff1f7ff759 (patch) | |
tree | 7f17cdff87e154937a15cc2ec8da9b4e6018ce8e /drivers/base/Makefile | |
parent | 77a527eadb425b60db3f5f0aae6a4c51c38e35e5 (diff) | |
download | linux-9ac7849e35f705830f7b016ff272b0ff1f7ff759.tar.gz linux-9ac7849e35f705830f7b016ff272b0ff1f7ff759.tar.bz2 linux-9ac7849e35f705830f7b016ff272b0ff1f7ff759.zip |
devres: device resource management
Implement device resource management, in short, devres. A device
driver can allocate arbirary size of devres data which is associated
with a release function. On driver detach, release function is
invoked on the devres data, then, devres data is freed.
devreses are typed by associated release functions. Some devreses are
better represented by single instance of the type while others need
multiple instances sharing the same release function. Both usages are
supported.
devreses can be grouped using devres group such that a device driver
can easily release acquired resources halfway through initialization
or selectively release resources (e.g. resources for port 1 out of 4
ports).
This patch adds devres core including documentation and the following
managed interfaces.
* alloc/free : devm_kzalloc(), devm_kzfree()
* IO region : devm_request_region(), devm_release_region()
* IRQ : devm_request_irq(), devm_free_irq()
* DMA : dmam_alloc_coherent(), dmam_free_coherent(),
dmam_declare_coherent_memory(), dmam_pool_create(),
dmam_pool_destroy()
* PCI : pcim_enable_device(), pcim_pin_device(), pci_is_managed()
* iomap : devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(),
devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(),
pcim_iomap(), pcim_iounmap()
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/base/Makefile')
-rw-r--r-- | drivers/base/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/Makefile b/drivers/base/Makefile index 7bbb9eeda235..e9eb7382ac3a 100644 --- a/drivers/base/Makefile +++ b/drivers/base/Makefile @@ -3,6 +3,7 @@ obj-y := core.o sys.o bus.o dd.o \ driver.o class.o platform.o \ cpu.o firmware.o init.o map.o dmapool.o \ + dma-mapping.o devres.o \ attribute_container.o transport_class.o obj-y += power/ obj-$(CONFIG_ISA) += isa.o |