|
@@ -144,6 +144,26 @@ static int device_reorder_to_tail(struct device *dev, void *not_used)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * device_pm_move_to_tail - Move set of devices to the end of device lists
|
|
|
+ * @dev: Device to move
|
|
|
+ *
|
|
|
+ * This is a device_reorder_to_tail() wrapper taking the requisite locks.
|
|
|
+ *
|
|
|
+ * It moves the @dev along with all of its children and all of its consumers
|
|
|
+ * to the ends of the device_kset and dpm_list, recursively.
|
|
|
+ */
|
|
|
+void device_pm_move_to_tail(struct device *dev)
|
|
|
+{
|
|
|
+ int idx;
|
|
|
+
|
|
|
+ idx = device_links_read_lock();
|
|
|
+ device_pm_lock();
|
|
|
+ device_reorder_to_tail(dev, NULL);
|
|
|
+ device_pm_unlock();
|
|
|
+ device_links_read_unlock(idx);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* device_link_add - Create a link between two devices.
|
|
|
* @consumer: Consumer end of the link.
|