aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/i2c-dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 86727fa8858f..9d55c6383b23 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -521,9 +521,9 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
521 return PTR_ERR(i2c_dev); 521 return PTR_ERR(i2c_dev);
522 522
523 /* register this i2c device with the driver core */ 523 /* register this i2c device with the driver core */
524 i2c_dev->dev = device_create(i2c_dev_class, &adap->dev, 524 i2c_dev->dev = device_create_drvdata(i2c_dev_class, &adap->dev,
525 MKDEV(I2C_MAJOR, adap->nr), 525 MKDEV(I2C_MAJOR, adap->nr),
526 "i2c-%d", adap->nr); 526 NULL, "i2c-%d", adap->nr);
527 if (IS_ERR(i2c_dev->dev)) { 527 if (IS_ERR(i2c_dev->dev)) {
528 res = PTR_ERR(i2c_dev->dev); 528 res = PTR_ERR(i2c_dev->dev);
529 goto error; 529 goto error;