mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
FROMGIT: driver core: Add device_is_dependent() to linux/device.h
DT implementation of fw_devlink needs this function to detect cycles. So
make it available.
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit 7d34ca3854
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/ for-next)
Signed-off-by: Saravana Kannan <saravanak@google.com>
Bug: 160736143
Change-Id: I8a457ed80292a5f1f2850b76eba226a7ed4461f7
This commit is contained in:
parent
86b41f4984
commit
b73e7575f3
|
|
@ -121,7 +121,7 @@ int device_links_read_lock_held(void)
|
|||
* Check if @target depends on @dev or any device dependent on it (its child or
|
||||
* its consumer etc). Return 1 if that is the case or 0 otherwise.
|
||||
*/
|
||||
static int device_is_dependent(struct device *dev, void *target)
|
||||
int device_is_dependent(struct device *dev, void *target)
|
||||
{
|
||||
struct device_link *link;
|
||||
int ret;
|
||||
|
|
|
|||
|
|
@ -829,6 +829,7 @@ extern int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid);
|
|||
extern const char *device_get_devnode(struct device *dev,
|
||||
umode_t *mode, kuid_t *uid, kgid_t *gid,
|
||||
const char **tmp);
|
||||
extern int device_is_dependent(struct device *dev, void *target);
|
||||
|
||||
static inline bool device_supports_offline(struct device *dev)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user