Commit d3e6975e authored by Randy Dunlap's avatar Randy Dunlap Committed by Adrian Bunk

devres: kernel-doc and DocBook

Make devres.c ready for adding to DocBook.
Add devres.c to DocBook.
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 0f8952c2
...@@ -84,6 +84,10 @@ X!Iinclude/linux/kobject.h ...@@ -84,6 +84,10 @@ X!Iinclude/linux/kobject.h
!Ekernel/rcupdate.c !Ekernel/rcupdate.c
</sect1> </sect1>
<sect1><title>Device Resource Management</title>
!Edrivers/base/devres.c
</sect1>
</chapter> </chapter>
<chapter id="adt"> <chapter id="adt">
......
...@@ -101,19 +101,6 @@ static void add_dr(struct device *dev, struct devres_node *node) ...@@ -101,19 +101,6 @@ static void add_dr(struct device *dev, struct devres_node *node)
list_add_tail(&node->entry, &dev->devres_head); list_add_tail(&node->entry, &dev->devres_head);
} }
/**
* devres_alloc - Allocate device resource data
* @release: Release function devres will be associated with
* @size: Allocation size
* @gfp: Allocation flags
*
* allocate devres of @size bytes. The allocated area is zeroed, then
* associated with @release. The returned pointer can be passed to
* other devres_*() functions.
*
* RETURNS:
* Pointer to allocated devres on success, NULL on failure.
*/
#ifdef CONFIG_DEBUG_DEVRES #ifdef CONFIG_DEBUG_DEVRES
void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
const char *name) const char *name)
...@@ -128,6 +115,19 @@ void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, ...@@ -128,6 +115,19 @@ void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
} }
EXPORT_SYMBOL_GPL(__devres_alloc); EXPORT_SYMBOL_GPL(__devres_alloc);
#else #else
/**
* devres_alloc - Allocate device resource data
* @release: Release function devres will be associated with
* @size: Allocation size
* @gfp: Allocation flags
*
* Allocate devres of @size bytes. The allocated area is zeroed, then
* associated with @release. The returned pointer can be passed to
* other devres_*() functions.
*
* RETURNS:
* Pointer to allocated devres on success, NULL on failure.
*/
void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp) void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp)
{ {
struct devres *dr; struct devres *dr;
...@@ -416,7 +416,7 @@ static int release_nodes(struct device *dev, struct list_head *first, ...@@ -416,7 +416,7 @@ static int release_nodes(struct device *dev, struct list_head *first,
} }
/** /**
* devres_release_all - Release all resources * devres_release_all - Release all managed resources
* @dev: Device to release resources for * @dev: Device to release resources for
* *
* Release all resources associated with @dev. This function is * Release all resources associated with @dev. This function is
...@@ -600,7 +600,7 @@ static int devm_kzalloc_match(struct device *dev, void *res, void *data) ...@@ -600,7 +600,7 @@ static int devm_kzalloc_match(struct device *dev, void *res, void *data)
} }
/** /**
* devm_kzalloc - Managed kzalloc * devm_kzalloc - Resource-managed kzalloc
* @dev: Device to allocate memory for * @dev: Device to allocate memory for
* @size: Allocation size * @size: Allocation size
* @gfp: Allocation gfp flags * @gfp: Allocation gfp flags
...@@ -628,7 +628,7 @@ void * devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) ...@@ -628,7 +628,7 @@ void * devm_kzalloc(struct device *dev, size_t size, gfp_t gfp)
EXPORT_SYMBOL_GPL(devm_kzalloc); EXPORT_SYMBOL_GPL(devm_kzalloc);
/** /**
* devm_kfree - Managed kfree * devm_kfree - Resource-managed kfree
* @dev: Device this memory belongs to * @dev: Device this memory belongs to
* @p: Memory to free * @p: Memory to free
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment