@ -1307,7 +1307,7 @@ static struct device_type rproc_type = {
* On success the new rproc is returned , and on failure , NULL .
*
* Note : _never_ directly deallocate @ rproc , even if it was not registered
* yet . Instead , when you need to unroll rproc_alloc ( ) , use rproc_put ( ) .
* yet . Instead , when you need to unroll rproc_alloc ( ) , use rproc_free ( ) .
*/
struct rproc * rproc_alloc ( struct device * dev , const char * name ,
const struct rproc_ops * ops ,
@ -1386,7 +1386,22 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
EXPORT_SYMBOL ( rproc_alloc ) ;
/**
* rproc_put ( ) - unroll rproc_alloc ( )
* rproc_free ( ) - unroll rproc_alloc ( )
* @ rproc : the remote processor handle
*
* This function decrements the rproc dev refcount .
*
* If no one holds any reference to rproc anymore , then its refcount would
* now drop to zero , and it would be freed .
*/
void rproc_free ( struct rproc * rproc )
{
put_device ( & rproc - > dev ) ;
}
EXPORT_SYMBOL ( rproc_free ) ;
/**
* rproc_put ( ) - release rproc reference
* @ rproc : the remote processor handle
*
* This function decrements the rproc dev refcount .
@ -1411,7 +1426,7 @@ EXPORT_SYMBOL(rproc_put);
*
* After rproc_del ( ) returns , @ rproc isn ' t freed yet , because
* of the outstanding reference created by rproc_alloc . To decrement that
* one last refcount , one still needs to call rproc_put ( ) .
* one last refcount , one still needs to call rproc_free ( ) .
*
* Returns 0 on success and - EINVAL if @ rproc isn ' t valid .
*/