|
@@ -67,10 +67,8 @@ void device_pm_unlock(void)
|
|
* device_pm_add - add a device to the list of active devices
|
|
* device_pm_add - add a device to the list of active devices
|
|
* @dev: Device to be added to the list
|
|
* @dev: Device to be added to the list
|
|
*/
|
|
*/
|
|
-int device_pm_add(struct device *dev)
|
|
|
|
|
|
+void device_pm_add(struct device *dev)
|
|
{
|
|
{
|
|
- int error;
|
|
|
|
-
|
|
|
|
pr_debug("PM: Adding info for %s:%s\n",
|
|
pr_debug("PM: Adding info for %s:%s\n",
|
|
dev->bus ? dev->bus->name : "No Bus",
|
|
dev->bus ? dev->bus->name : "No Bus",
|
|
kobject_name(&dev->kobj));
|
|
kobject_name(&dev->kobj));
|
|
@@ -89,13 +87,9 @@ int device_pm_add(struct device *dev)
|
|
*/
|
|
*/
|
|
WARN_ON(true);
|
|
WARN_ON(true);
|
|
}
|
|
}
|
|
- error = dpm_sysfs_add(dev);
|
|
|
|
- if (!error) {
|
|
|
|
- dev->power.status = DPM_ON;
|
|
|
|
- list_add_tail(&dev->power.entry, &dpm_list);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ list_add_tail(&dev->power.entry, &dpm_list);
|
|
mutex_unlock(&dpm_list_mtx);
|
|
mutex_unlock(&dpm_list_mtx);
|
|
- return error;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -110,7 +104,6 @@ void device_pm_remove(struct device *dev)
|
|
dev->bus ? dev->bus->name : "No Bus",
|
|
dev->bus ? dev->bus->name : "No Bus",
|
|
kobject_name(&dev->kobj));
|
|
kobject_name(&dev->kobj));
|
|
mutex_lock(&dpm_list_mtx);
|
|
mutex_lock(&dpm_list_mtx);
|
|
- dpm_sysfs_remove(dev);
|
|
|
|
list_del_init(&dev->power.entry);
|
|
list_del_init(&dev->power.entry);
|
|
mutex_unlock(&dpm_list_mtx);
|
|
mutex_unlock(&dpm_list_mtx);
|
|
}
|
|
}
|