diff mbox

PM / sleep: Remove unused `info' variable

Message ID 1461847354-11486-1-git-send-email-thierry.reding@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Thierry Reding April 28, 2016, 12:42 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

Commit 32e8d689dc12 ("PM / sleep: trace_device_pm_callback coverage in
dpm_prepare/complete") removed all users of this variable but forgot to
remove the variable itself.

Cc: Todd Brandt <todd.e.brandt@linux.intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/base/power/main.c | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

Comments

Rafael J. Wysocki May 4, 2016, 9:23 p.m. UTC | #1
On Thursday, April 28, 2016 02:42:34 PM Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Commit 32e8d689dc12 ("PM / sleep: trace_device_pm_callback coverage in
> dpm_prepare/complete") removed all users of this variable but forgot to
> remove the variable itself.
> 
> Cc: Todd Brandt <todd.e.brandt@linux.intel.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Applied, thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 6e7c3ccea24b..c81667d4bb60 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -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);