summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-dev.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-06-13 09:47:27 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 11:10:36 -0700
commit4941b395b3c2635a8c16d88791a789fb6ac6be43 (patch)
tree82c06cf9135c65a6d4c48240b87df8ceb73ffa48 /drivers/i2c/i2c-dev.c
parent6af586dc58820d052aa538abef4d4d15c2a9e33e (diff)
downloadop-kernel-dev-4941b395b3c2635a8c16d88791a789fb6ac6be43.zip
op-kernel-dev-4941b395b3c2635a8c16d88791a789fb6ac6be43.tar.gz
[PATCH] I2C: I2C controllers go into right place on sysfs
I2C creates some sysfs nodes in the wrong places: not as children of parent controllers, but as their peers (!). This puts them into the right place always, instead of just when the adapter is on the platform bus. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r--drivers/i2c/i2c-dev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index ed7eed3..58ccddd 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)
/* register this i2c device with the driver core */
i2c_dev->adap = adap;
- if (adap->dev.parent == &platform_bus)
- dev = &adap->dev;
- else
- dev = adap->dev.parent;
+ dev = &adap->dev;
i2c_dev->class_dev = class_device_create(i2c_dev_class, NULL,
MKDEV(I2C_MAJOR, i2c_dev->minor),
dev, "i2c-%d", i2c_dev->minor);
OpenPOWER on IntegriCloud