diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-14 22:03:50 +0100 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-01-14 22:03:50 +0100 |
commit | f4e8db31a83ad019e9ae06edb9c2f89de66bc7b7 (patch) | |
tree | ff22016d827ca142253788e08afbc6e916b36b8a /drivers/i2c/i2c-core.c | |
parent | d529de2994880d345d7588f92d5a426f63089ba3 (diff) | |
download | op-kernel-dev-f4e8db31a83ad019e9ae06edb9c2f89de66bc7b7.zip op-kernel-dev-f4e8db31a83ad019e9ae06edb9c2f89de66bc7b7.tar.gz |
i2c: Encourage move to dev_pm_ops by warning on use of legacy methods
Since the PM core wishes to transition away from the legacy suspend
and resume methods and since removing them makes using PM core features
like runtime PM much easier start warning when a driver is registered
using the legacy methods.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 0f9dc7d..f0bd5bc 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1124,6 +1124,14 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) if (res) return res; + /* Drivers should switch to dev_pm_ops instead. */ + if (driver->suspend) + pr_warn("i2c-core: driver [%s] using legacy suspend method\n", + driver->driver.name); + if (driver->resume) + pr_warn("i2c-core: driver [%s] using legacy resume method\n", + driver->driver.name); + pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name); INIT_LIST_HEAD(&driver->clients); |