lkml.org 
[lkml]   [2013]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] drivers/bus: Add Legacy PM OPS usage check and warning to bus_register()
Date
Add Legacy PM OPS usage checks to bus_register() function. If Legacy PM OPS
usage is found, print warning message to indicate 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@samsung.com>
---
drivers/base/bus.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 4c289ab..9e68453 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -991,6 +991,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': Please update to use dev pm ops.\n",
+ bus->name);
return 0;

bus_groups_fail:
--
1.8.3.2


\
 
 \ /
  Last update: 2013-11-08 02:21    [W:0.859 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site