16 Nov, 2011

1 commit

  • Almost every platform_driver does the three steps get_resource,
    request_mem_region, ioremap. This does not only lead to a lot of code
    duplication, but also a huge number of similar error strings and
    inconsistent error codes on failure. So, introduce a helper function
    which simplifies remapping a resource and make it hard to do something
    wrong and add documentation for it.

    Signed-off-by: Wolfram Sang
    Acked-by: Grant Likely
    Acked-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Wolfram Sang
     

13 Jun, 2009

1 commit


20 Oct, 2007

1 commit

  • Most of these fixes were already submitted for old kernel versions, and were
    approved, but for some reason they never made it into the releases.

    Because this is a consolidation of a couple old missed patches, it touches both
    Kconfigs and documentation texts.

    Signed-off-by: Matt LaPlante
    Acked-by: Randy Dunlap
    Signed-off-by: Adrian Bunk

    Matt LaPlante
     

19 Jul, 2007

1 commit


03 May, 2007

1 commit


10 Feb, 2007

1 commit

  • 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
    Signed-off-by: Jeff Garzik

    Tejun Heo