@@ -262,7 +262,7 @@ static void device_link_remove_from_lists(struct device_link *link)
}
#endif /* !CONFIG_SRCU */
-static bool device_is_ancestor(struct device *dev, struct device *target)
+bool device_is_ancestor(struct device *dev, struct device *target)
{
while (target->parent) {
target = target->parent;
@@ -271,6 +271,7 @@ static bool device_is_ancestor(struct device *dev, struct device *target)
}
return false;
}
+EXPORT_SYMBOL_GPL(device_is_ancestor);
/**
* device_is_dependent - Check if one device depends on another one
@@ -909,6 +909,7 @@ int device_move(struct device *dev, struct device *new_parent,
int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid);
const char *device_get_devnode(struct device *dev, umode_t *mode, kuid_t *uid,
kgid_t *gid, const char **tmp);
+bool device_is_ancestor(struct device *dev, struct device *target);
int device_is_dependent(struct device *dev, void *target);
static inline bool device_supports_offline(struct device *dev)