diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-05-04 10:52:40 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-05-04 10:52:40 +1000 |
commit | 7e70c535f5eb42f7a0c9a19a4c4e57ed3ed197d0 (patch) | |
tree | 7b175709d1d06d7f1385ec00253b35e0567a3cad /drivers/i2c | |
parent | 6bc925bfc585d6dd5f788710f63731f647ddbafb (diff) |
i2c: Warn when adapters have no parent
Warn more loudly when an i2c-adapter is registered without a parent.
There should be almost no driver left in this case, and it's about
time to fix these.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 635c488262c0..71fdf314bcc6 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -457,8 +457,9 @@ static int i2c_register_adapter(struct i2c_adapter *adap) */ if (adap->dev.parent == NULL) { adap->dev.parent = &platform_bus; - pr_debug("I2C adapter driver [%s] forgot to specify " - "physical device\n", adap->name); + pr_warning("I2C adapter driver [%s] forgot to specify " + "physical device\n", adap->name); + pr_warning("Fix it now, it will soon break!\n"); } /* Set default timeout to 1 second if not already set */ |