diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-12-24 09:03:34 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2010-12-24 09:03:34 -0500 |
commit | 5c1a07ab3e78ef68fc9ccf419c969e8ed88d7cb6 (patch) | |
tree | 4c3866f747a5947ed7f687d625059381944304e5 /drivers/base/power/main.c | |
parent | b64959e6158d6dcb640fc22d7f43b94ad1c91135 (diff) |
PM: Use dev_name() in core device suspend and resume routines
Use dev_name() wherever applicable in drivers/base/power/main.c.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r-- | drivers/base/power/main.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 11fe6ed75278..2a52270aeb30 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -88,8 +88,7 @@ void device_pm_unlock(void) | |||
88 | void device_pm_add(struct device *dev) | 88 | void device_pm_add(struct device *dev) |
89 | { | 89 | { |
90 | pr_debug("PM: Adding info for %s:%s\n", | 90 | pr_debug("PM: Adding info for %s:%s\n", |
91 | dev->bus ? dev->bus->name : "No Bus", | 91 | dev->bus ? dev->bus->name : "No Bus", dev_name(dev)); |
92 | kobject_name(&dev->kobj)); | ||
93 | mutex_lock(&dpm_list_mtx); | 92 | mutex_lock(&dpm_list_mtx); |
94 | if (dev->parent && dev->parent->power.in_suspend) | 93 | if (dev->parent && dev->parent->power.in_suspend) |
95 | dev_warn(dev, "parent %s should not be sleeping\n", | 94 | dev_warn(dev, "parent %s should not be sleeping\n", |
@@ -105,8 +104,7 @@ void device_pm_add(struct device *dev) | |||
105 | void device_pm_remove(struct device *dev) | 104 | void device_pm_remove(struct device *dev) |
106 | { | 105 | { |
107 | pr_debug("PM: Removing info for %s:%s\n", | 106 | pr_debug("PM: Removing info for %s:%s\n", |
108 | dev->bus ? dev->bus->name : "No Bus", | 107 | dev->bus ? dev->bus->name : "No Bus", dev_name(dev)); |
109 | kobject_name(&dev->kobj)); | ||
110 | complete_all(&dev->power.completion); | 108 | complete_all(&dev->power.completion); |
111 | mutex_lock(&dpm_list_mtx); | 109 | mutex_lock(&dpm_list_mtx); |
112 | list_del_init(&dev->power.entry); | 110 | list_del_init(&dev->power.entry); |
@@ -123,10 +121,8 @@ void device_pm_remove(struct device *dev) | |||
123 | void device_pm_move_before(struct device *deva, struct device *devb) | 121 | void device_pm_move_before(struct device *deva, struct device *devb) |
124 | { | 122 | { |
125 | pr_debug("PM: Moving %s:%s before %s:%s\n", | 123 | pr_debug("PM: Moving %s:%s before %s:%s\n", |
126 | deva->bus ? deva->bus->name : "No Bus", | 124 | deva->bus ? deva->bus->name : "No Bus", dev_name(deva), |
127 | kobject_name(&deva->kobj), | 125 | devb->bus ? devb->bus->name : "No Bus", dev_name(devb)); |
128 | devb->bus ? devb->bus->name : "No Bus", | ||
129 | kobject_name(&devb->kobj)); | ||
130 | /* Delete deva from dpm_list and reinsert before devb. */ | 126 | /* Delete deva from dpm_list and reinsert before devb. */ |
131 | list_move_tail(&deva->power.entry, &devb->power.entry); | 127 | list_move_tail(&deva->power.entry, &devb->power.entry); |
132 | } | 128 | } |
@@ -139,10 +135,8 @@ void device_pm_move_before(struct device *deva, struct device *devb) | |||
139 | void device_pm_move_after(struct device *deva, struct device *devb) | 135 | void device_pm_move_after(struct device *deva, struct device *devb) |
140 | { | 136 | { |
141 | pr_debug("PM: Moving %s:%s after %s:%s\n", | 137 | pr_debug("PM: Moving %s:%s after %s:%s\n", |
142 | deva->bus ? deva->bus->name : "No Bus", | 138 | deva->bus ? deva->bus->name : "No Bus", dev_name(deva), |
143 | kobject_name(&deva->kobj), | 139 | devb->bus ? devb->bus->name : "No Bus", dev_name(devb)); |
144 | devb->bus ? devb->bus->name : "No Bus", | ||
145 | kobject_name(&devb->kobj)); | ||
146 | /* Delete deva from dpm_list and reinsert after devb. */ | 140 | /* Delete deva from dpm_list and reinsert after devb. */ |
147 | list_move(&deva->power.entry, &devb->power.entry); | 141 | list_move(&deva->power.entry, &devb->power.entry); |
148 | } | 142 | } |
@@ -154,8 +148,7 @@ void device_pm_move_after(struct device *deva, struct device *devb) | |||
154 | void device_pm_move_last(struct device *dev) | 148 | void device_pm_move_last(struct device *dev) |
155 | { | 149 | { |
156 | pr_debug("PM: Moving %s:%s to end of list\n", | 150 | pr_debug("PM: Moving %s:%s to end of list\n", |
157 | dev->bus ? dev->bus->name : "No Bus", | 151 | dev->bus ? dev->bus->name : "No Bus", dev_name(dev)); |
158 | kobject_name(&dev->kobj)); | ||
159 | list_move_tail(&dev->power.entry, &dpm_list); | 152 | list_move_tail(&dev->power.entry, &dpm_list); |
160 | } | 153 | } |
161 | 154 | ||
@@ -393,7 +386,7 @@ static void pm_dev_err(struct device *dev, pm_message_t state, char *info, | |||
393 | int error) | 386 | int error) |
394 | { | 387 | { |
395 | printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n", | 388 | printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n", |
396 | kobject_name(&dev->kobj), pm_verb(state.event), info, error); | 389 | dev_name(dev), pm_verb(state.event), info, error); |
397 | } | 390 | } |
398 | 391 | ||
399 | static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) | 392 | static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) |
@@ -1028,7 +1021,7 @@ static int dpm_prepare(pm_message_t state) | |||
1028 | } | 1021 | } |
1029 | printk(KERN_INFO "PM: Device %s not prepared " | 1022 | printk(KERN_INFO "PM: Device %s not prepared " |
1030 | "for power transition: code %d\n", | 1023 | "for power transition: code %d\n", |
1031 | kobject_name(&dev->kobj), error); | 1024 | dev_name(dev), error); |
1032 | put_device(dev); | 1025 | put_device(dev); |
1033 | break; | 1026 | break; |
1034 | } | 1027 | } |