Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
devres.c File Reference
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/gfp.h>
#include <linux/export.h>

Go to the source code of this file.

Functions

void devm_ioremap_release (struct device *dev, void *res)
 
void __iomemdevm_ioremap (struct device *dev, resource_size_t offset, unsigned long size)
 
 EXPORT_SYMBOL (devm_ioremap)
 
void __iomemdevm_ioremap_nocache (struct device *dev, resource_size_t offset, unsigned long size)
 
 EXPORT_SYMBOL (devm_ioremap_nocache)
 
void devm_iounmap (struct device *dev, void __iomem *addr)
 
 EXPORT_SYMBOL (devm_iounmap)
 
void __iomemdevm_request_and_ioremap (struct device *dev, struct resource *res)
 
 EXPORT_SYMBOL (devm_request_and_ioremap)
 

Function Documentation

void __iomem* devm_ioremap ( struct device dev,
resource_size_t  offset,
unsigned long  size 
)

devm_ioremap - Managed ioremap() : Generic device to remap IO address for : BUS offset to map : Size of map

Managed ioremap(). Map is automatically unmapped on driver detach.

Definition at line 24 of file devres.c.

void __iomem* devm_ioremap_nocache ( struct device dev,
resource_size_t  offset,
unsigned long  size 
)

devm_ioremap_nocache - Managed ioremap_nocache() : Generic device to remap IO address for : BUS offset to map : Size of map

Managed ioremap_nocache(). Map is automatically unmapped on driver detach.

Definition at line 53 of file devres.c.

void devm_ioremap_release ( struct device dev,
void res 
)

Definition at line 6 of file devres.c.

void devm_iounmap ( struct device dev,
void __iomem addr 
)

devm_iounmap - Managed iounmap() : Generic device to unmap for : Address to unmap

Managed iounmap(). must have been mapped using devm_ioremap*().

Definition at line 80 of file devres.c.

void __iomem* devm_request_and_ioremap ( struct device dev,
struct resource res 
)

devm_request_and_ioremap() - Check, request region, and ioremap resource : Generic device to handle the resource for : resource to be handled

Takes all necessary steps to ioremap a mem resource. Uses managed device, so everything is undone on driver detach. Checks arguments, so you can feed it the result from e.g. platform_get_resource() directly. Returns the remapped pointer or NULL on error. Usage example:

res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_request_and_ioremap(&pdev->dev, res); if (!base) return -EADDRNOTAVAIL;

Definition at line 103 of file devres.c.

EXPORT_SYMBOL ( devm_ioremap  )
EXPORT_SYMBOL ( devm_ioremap_nocache  )
EXPORT_SYMBOL ( devm_iounmap  )
EXPORT_SYMBOL ( devm_request_and_ioremap  )