[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1b1d24cd7140784f96b9d1fee9cace9da04a88f5.1389034060.git.shuah.kh@samsung.com>
Date: Mon, 6 Jan 2014 13:03:21 -0700
From: Shuah Khan <shuah.kh@...sung.com>
To: gregkh@...uxfoundation.org, rjw@...ysocki.net
Cc: Shuah Khan <shuah.kh@...sung.com>, shuahkhan@...il.com,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 1/3] drivers/bus: Add Legacy PM OPS usage check and warning to bus_register()
Add Legacy PM OPS usage checks to bus_register() function. If Legacy PM OPS
usage is found, print warning message to indicate that the driver code needs
updating to use Dev PM OPS interfaces. This will help serve as a way to track
drivers that still use Legacy PM OPS and fix them.
The Legacy PM OPS check looks for suspend(struct device *, pm_message_t) or
resume(struct device *) bus level interfaces.
Signed-off-by: Shuah Khan <shuah.kh@...sung.com>
---
drivers/base/bus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 73f6c29..e8753a7 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -916,6 +916,9 @@ int bus_register(struct bus_type *bus)
goto bus_groups_fail;
pr_debug("bus: '%s': registered\n", bus->name);
+ if (bus->suspend || bus->resume)
+ pr_warn("bus '%s' needs updating - use pm pointer.\n",
+ bus->name);
return 0;
bus_groups_fail:
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists