|
@@ -1556,7 +1556,6 @@ int dpm_suspend(pm_message_t state)
|
|
|
static int device_prepare(struct device *dev, pm_message_t state)
|
|
|
{
|
|
|
int (*callback)(struct device *) = NULL;
|
|
|
- char *info = NULL;
|
|
|
int ret = 0;
|
|
|
|
|
|
if (dev->power.syscore)
|
|
@@ -1579,24 +1578,17 @@ static int device_prepare(struct device *dev, pm_message_t state)
|
|
|
goto unlock;
|
|
|
}
|
|
|
|
|
|
- if (dev->pm_domain) {
|
|
|
- info = "preparing power domain ";
|
|
|
+ if (dev->pm_domain)
|
|
|
callback = dev->pm_domain->ops.prepare;
|
|
|
- } else if (dev->type && dev->type->pm) {
|
|
|
- info = "preparing type ";
|
|
|
+ else if (dev->type && dev->type->pm)
|
|
|
callback = dev->type->pm->prepare;
|
|
|
- } else if (dev->class && dev->class->pm) {
|
|
|
- info = "preparing class ";
|
|
|
+ else if (dev->class && dev->class->pm)
|
|
|
callback = dev->class->pm->prepare;
|
|
|
- } else if (dev->bus && dev->bus->pm) {
|
|
|
- info = "preparing bus ";
|
|
|
+ else if (dev->bus && dev->bus->pm)
|
|
|
callback = dev->bus->pm->prepare;
|
|
|
- }
|
|
|
|
|
|
- if (!callback && dev->driver && dev->driver->pm) {
|
|
|
- info = "preparing driver ";
|
|
|
+ if (!callback && dev->driver && dev->driver->pm)
|
|
|
callback = dev->driver->pm->prepare;
|
|
|
- }
|
|
|
|
|
|
if (callback)
|
|
|
ret = callback(dev);
|