diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-04-17 10:20:19 +0200 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-04-17 10:20:19 +0200 |
commit | a920ff41cb3d2b03da095c4fa1a11b71417ae2a4 (patch) | |
tree | 4e6baaa16a9a50fc9caf75b8ced376613317ba84 /drivers | |
parent | d733ed6c34be3aef0517a04e4103eed6b369ec50 (diff) | |
download | linux-a920ff41cb3d2b03da095c4fa1a11b71417ae2a4.tar.bz2 |
i2c: Improve deprecation warnings
When warning on the use of deprecated i2c_driver methods
attach_adapter and detach_adapter, mention the name of the driver
which needs to be updated.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/i2c-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 70c30e6bce0b..9a58994ff7ea 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -797,7 +797,8 @@ static int i2c_do_add_adapter(struct i2c_driver *driver, /* Let legacy drivers scan this bus for matching devices */ if (driver->attach_adapter) { - dev_warn(&adap->dev, "attach_adapter method is deprecated\n"); + dev_warn(&adap->dev, "%s: attach_adapter method is deprecated\n", + driver->driver.name); dev_warn(&adap->dev, "Please use another way to instantiate " "your i2c_client\n"); /* We ignore the return code; if it fails, too bad */ @@ -984,7 +985,8 @@ static int i2c_do_del_adapter(struct i2c_driver *driver, if (!driver->detach_adapter) return 0; - dev_warn(&adapter->dev, "detach_adapter method is deprecated\n"); + dev_warn(&adapter->dev, "%s: detach_adapter method is deprecated\n", + driver->driver.name); res = driver->detach_adapter(adapter); if (res) dev_err(&adapter->dev, "detach_adapter failed (%d) " |