diff options
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r-- | drivers/base/power/main.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 3250c5257b74..284f564bb12b 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -67,10 +67,8 @@ void device_pm_unlock(void) | |||
67 | * device_pm_add - add a device to the list of active devices | 67 | * device_pm_add - add a device to the list of active devices |
68 | * @dev: Device to be added to the list | 68 | * @dev: Device to be added to the list |
69 | */ | 69 | */ |
70 | int device_pm_add(struct device *dev) | 70 | void device_pm_add(struct device *dev) |
71 | { | 71 | { |
72 | int error; | ||
73 | |||
74 | pr_debug("PM: Adding info for %s:%s\n", | 72 | pr_debug("PM: Adding info for %s:%s\n", |
75 | dev->bus ? dev->bus->name : "No Bus", | 73 | dev->bus ? dev->bus->name : "No Bus", |
76 | kobject_name(&dev->kobj)); | 74 | kobject_name(&dev->kobj)); |
@@ -89,13 +87,9 @@ int device_pm_add(struct device *dev) | |||
89 | */ | 87 | */ |
90 | WARN_ON(true); | 88 | WARN_ON(true); |
91 | } | 89 | } |
92 | error = dpm_sysfs_add(dev); | 90 | |
93 | if (!error) { | 91 | list_add_tail(&dev->power.entry, &dpm_list); |
94 | dev->power.status = DPM_ON; | ||
95 | list_add_tail(&dev->power.entry, &dpm_list); | ||
96 | } | ||
97 | mutex_unlock(&dpm_list_mtx); | 92 | mutex_unlock(&dpm_list_mtx); |
98 | return error; | ||
99 | } | 93 | } |
100 | 94 | ||
101 | /** | 95 | /** |
@@ -110,7 +104,6 @@ void device_pm_remove(struct device *dev) | |||
110 | dev->bus ? dev->bus->name : "No Bus", | 104 | dev->bus ? dev->bus->name : "No Bus", |
111 | kobject_name(&dev->kobj)); | 105 | kobject_name(&dev->kobj)); |
112 | mutex_lock(&dpm_list_mtx); | 106 | mutex_lock(&dpm_list_mtx); |
113 | dpm_sysfs_remove(dev); | ||
114 | list_del_init(&dev->power.entry); | 107 | list_del_init(&dev->power.entry); |
115 | mutex_unlock(&dpm_list_mtx); | 108 | mutex_unlock(&dpm_list_mtx); |
116 | } | 109 | } |