summaryrefslogtreecommitdiff
path: root/include/linux/device.h
blob: e76635cfde9ee8b63730c06e6b575e064994c457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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 <[email protected]>
 * Copyright (c) 2004-2009 Greg Kroah-Hartman <[email protected]>
 * 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_ */