From db0118a314f8d550883a039827e421a9ddfb6af5 Mon Sep 17 00:00:00 2001 From: Ruslan Bilovol Date: Fri, 17 Aug 2012 13:18:58 +0300 Subject: ARM: OMAP: PM: Add more information on error path Sometimes if some code tries to remove requested throughput, the message "Invalid Device Structure" is shown. This message is not informative because it's unknown for what device it was tried - so now added more information to that message. Change-Id: Id26bf385dafd4992c8c3487d9dc38935e0fcd777 Signed-off-by: Ruslan Bilovol --- arch/arm/plat-omap/omap-pm-helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-omap') diff --git a/arch/arm/plat-omap/omap-pm-helper.c b/arch/arm/plat-omap/omap-pm-helper.c index 2fdd7af..c107bac 100644 --- a/arch/arm/plat-omap/omap-pm-helper.c +++ b/arch/arm/plat-omap/omap-pm-helper.c @@ -225,10 +225,13 @@ unlock: */ static unsigned long remove_req_tput(struct device *dev) { + struct platform_device *pdev; struct users *user; int found = 0; int ret; + pdev = container_of(dev, struct platform_device, dev); + mutex_lock(&bus_tput->throughput_mutex); list_for_each_entry(user, &bus_tput->users_list, node) { if (user->dev == dev) { @@ -238,7 +241,7 @@ static unsigned long remove_req_tput(struct device *dev) } if (!found) { /* No such user exists */ - pr_err("Invalid Device Structure\n"); + pr_err("OMAP-PM: Invalid Device Structure for %s\n", pdev->name); ret = 0; goto unlock; } -- cgit v1.1