diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-06-15 12:01:48 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-06-15 12:01:48 -0400 |
commit | c52cf01f5b35d77b2a918c319e22567de5c3c15f (patch) | |
tree | 98e4d0243219505a6bf0e148424c2822c7b3f1d0 /drivers/i2c/i2c-core.c | |
parent | fa1b2ca4fa271f9300a764b9d505a027156f749b (diff) |
i2c: Do not give adapters a default parent
We don't need to give adapters a parent if they don't have one. The
driver core will put them in the virtual device directory and all will
be fine.
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 | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 635c488262c0..5ed622ee65c3 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/init.h> | 30 | #include <linux/init.h> |
31 | #include <linux/idr.h> | 31 | #include <linux/idr.h> |
32 | #include <linux/platform_device.h> | ||
33 | #include <linux/mutex.h> | 32 | #include <linux/mutex.h> |
34 | #include <linux/completion.h> | 33 | #include <linux/completion.h> |
35 | #include <linux/hardirq.h> | 34 | #include <linux/hardirq.h> |
@@ -451,16 +450,6 @@ static int i2c_register_adapter(struct i2c_adapter *adap) | |||
451 | 450 | ||
452 | mutex_lock(&core_lock); | 451 | mutex_lock(&core_lock); |
453 | 452 | ||
454 | /* Add the adapter to the driver core. | ||
455 | * If the parent pointer is not set up, | ||
456 | * we add this adapter to the host bus. | ||
457 | */ | ||
458 | if (adap->dev.parent == NULL) { | ||
459 | adap->dev.parent = &platform_bus; | ||
460 | pr_debug("I2C adapter driver [%s] forgot to specify " | ||
461 | "physical device\n", adap->name); | ||
462 | } | ||
463 | |||
464 | /* Set default timeout to 1 second if not already set */ | 453 | /* Set default timeout to 1 second if not already set */ |
465 | if (adap->timeout == 0) | 454 | if (adap->timeout == 0) |
466 | adap->timeout = HZ; | 455 | adap->timeout = HZ; |