diff options
| -rw-r--r-- | drivers/base/power/trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c index 0a1a2c4dbc6e..17e24e3f4422 100644 --- a/drivers/base/power/trace.c +++ b/drivers/base/power/trace.c | |||
| @@ -188,8 +188,10 @@ static int show_file_hash(unsigned int value) | |||
| 188 | static int show_dev_hash(unsigned int value) | 188 | static int show_dev_hash(unsigned int value) |
| 189 | { | 189 | { |
| 190 | int match = 0; | 190 | int match = 0; |
| 191 | struct list_head *entry = dpm_list.prev; | 191 | struct list_head *entry; |
| 192 | 192 | ||
| 193 | device_pm_lock(); | ||
| 194 | entry = dpm_list.prev; | ||
| 193 | while (entry != &dpm_list) { | 195 | while (entry != &dpm_list) { |
| 194 | struct device * dev = to_device(entry); | 196 | struct device * dev = to_device(entry); |
| 195 | unsigned int hash = hash_string(DEVSEED, dev_name(dev), DEVHASH); | 197 | unsigned int hash = hash_string(DEVSEED, dev_name(dev), DEVHASH); |
| @@ -199,6 +201,7 @@ static int show_dev_hash(unsigned int value) | |||
| 199 | } | 201 | } |
| 200 | entry = entry->prev; | 202 | entry = entry->prev; |
| 201 | } | 203 | } |
| 204 | device_pm_unlock(); | ||
| 202 | return match; | 205 | return match; |
| 203 | } | 206 | } |
| 204 | 207 | ||
