mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-04-26 00:11:02 +02:00
This function just wraps udevice->name. Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
30 lines
707 B
C
30 lines
707 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* device.h - generic, centralized driver model
|
|
*
|
|
* U-Boot: compat header derived from Linux
|
|
*
|
|
* Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
|
|
* Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de>
|
|
* Copyright (c) 2008-2009 Novell Inc.
|
|
*
|
|
* See Documentation/driver-api/driver-model/ for more information.
|
|
*/
|
|
|
|
#ifndef _DEVICE_H_
|
|
#define _DEVICE_H_
|
|
|
|
#include <dm/device.h>
|
|
|
|
/**
|
|
* dev_name - Return a device's name.
|
|
* @dev: Device with name to get.
|
|
* Return: The kobject name of the device, or its initial name if unavailable.
|
|
*/
|
|
static inline const char *dev_name(const struct udevice *dev)
|
|
{
|
|
return dev->name;
|
|
}
|
|
|
|
#endif /* _DEVICE_H_ */
|