dm: core: remove type 'static' of function uclass_get_device_tail()
Uclass API provides a few functions for get/find the device. To provide a complete function set of uclass-internal functions, for use by the drivers, the function uclass_get_device_tail() should be non-static. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
f9c370dcdf
commit
794d521917
|
@ -263,17 +263,7 @@ static int uclass_find_device_by_of_offset(enum uclass_id id, int node,
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
int uclass_get_device_tail(struct udevice *dev, int ret,
|
||||||
* uclass_get_device_tail() - handle the end of a get_device call
|
|
||||||
*
|
|
||||||
* This handles returning an error or probing a device as needed.
|
|
||||||
*
|
|
||||||
* @dev: Device that needs to be probed
|
|
||||||
* @ret: Error to return. If non-zero then the device is not probed
|
|
||||||
* @devp: Returns the value of 'dev' if there is no error
|
|
||||||
* @return ret, if non-zero, else the result of the device_probe() call
|
|
||||||
*/
|
|
||||||
static int uclass_get_device_tail(struct udevice *dev, int ret,
|
|
||||||
struct udevice **devp)
|
struct udevice **devp)
|
||||||
{
|
{
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -10,13 +10,26 @@
|
||||||
#ifndef _DM_UCLASS_INTERNAL_H
|
#ifndef _DM_UCLASS_INTERNAL_H
|
||||||
#define _DM_UCLASS_INTERNAL_H
|
#define _DM_UCLASS_INTERNAL_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uclass_get_device_tail() - handle the end of a get_device call
|
||||||
|
*
|
||||||
|
* This handles returning an error or probing a device as needed.
|
||||||
|
*
|
||||||
|
* @dev: Device that needs to be probed
|
||||||
|
* @ret: Error to return. If non-zero then the device is not probed
|
||||||
|
* @devp: Returns the value of 'dev' if there is no error
|
||||||
|
* @return ret, if non-zero, else the result of the device_probe() call
|
||||||
|
*/
|
||||||
|
int uclass_get_device_tail(struct udevice *dev, int ret, struct udevice **devp);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* uclass_find_device() - Return n-th child of uclass
|
* uclass_find_device() - Return n-th child of uclass
|
||||||
* @id: Id number of the uclass
|
* @id: Id number of the uclass
|
||||||
* @index: Position of the child in uclass's list
|
* @index: Position of the child in uclass's list
|
||||||
* #devp: Returns pointer to device, or NULL on error
|
* #devp: Returns pointer to device, or NULL on error
|
||||||
*
|
*
|
||||||
* The device is not prepared for use - this is an internal function
|
* The device is not prepared for use - this is an internal function.
|
||||||
|
* The function uclass_get_device_tail() can be used to probe the device.
|
||||||
*
|
*
|
||||||
* @return the uclass pointer of a child at the given index or
|
* @return the uclass pointer of a child at the given index or
|
||||||
* return NULL on error.
|
* return NULL on error.
|
||||||
|
@ -28,7 +41,8 @@ int uclass_find_device(enum uclass_id id, int index, struct udevice **devp);
|
||||||
* @id: Id number of the uclass
|
* @id: Id number of the uclass
|
||||||
* #devp: Returns pointer to device, or NULL on error
|
* #devp: Returns pointer to device, or NULL on error
|
||||||
*
|
*
|
||||||
* The device is not prepared for use - this is an internal function
|
* The device is not prepared for use - this is an internal function.
|
||||||
|
* The function uclass_get_device_tail() can be used to probe the device.
|
||||||
*
|
*
|
||||||
* @return 0 if OK (found or not found), -1 on error
|
* @return 0 if OK (found or not found), -1 on error
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +53,8 @@ int uclass_find_first_device(enum uclass_id id, struct udevice **devp);
|
||||||
* @devp: On entry, pointer to device to lookup. On exit, returns pointer
|
* @devp: On entry, pointer to device to lookup. On exit, returns pointer
|
||||||
* to the next device in the same uclass, or NULL if none
|
* to the next device in the same uclass, or NULL if none
|
||||||
*
|
*
|
||||||
* The device is not prepared for use - this is an internal function
|
* The device is not prepared for use - this is an internal function.
|
||||||
|
* The function uclass_get_device_tail() can be used to probe the device.
|
||||||
*
|
*
|
||||||
* @return 0 if OK (found or not found), -1 on error
|
* @return 0 if OK (found or not found), -1 on error
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue