[PATCH] i2c: Warn when adapters have no parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 drivers/i2c/i2c-core.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- linux-2.6.30-rc3.orig/drivers/i2c/i2c-core.c	2009-04-25 08:46:12.000000000 +0200
+++ linux-2.6.30-rc3/drivers/i2c/i2c-core.c	2009-04-26 10:10:40.000000000 +0200
@@ -457,8 +457,9 @@ static int i2c_register_adapter(struct i
 	 */
 	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 */


-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux