diff options
-rw-r--r-- | drivers/i2c/i2c-dev.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index ed7eed388bae..58ccddd5c237 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c | |||
@@ -426,10 +426,7 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap) | |||
426 | 426 | ||
427 | /* register this i2c device with the driver core */ | 427 | /* register this i2c device with the driver core */ |
428 | i2c_dev->adap = adap; | 428 | i2c_dev->adap = adap; |
429 | if (adap->dev.parent == &platform_bus) | 429 | dev = &adap->dev; |
430 | dev = &adap->dev; | ||
431 | else | ||
432 | dev = adap->dev.parent; | ||
433 | i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL, | 430 | i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL, |
434 | MKDEV(I2C_MAJOR, i2c_dev->minor), | 431 | MKDEV(I2C_MAJOR, i2c_dev->minor), |
435 | dev, "i2c-%d", i2c_dev->minor); | 432 | dev, "i2c-%d", i2c_dev->minor); |