|
@@ -521,9 +521,9 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
|
|
return PTR_ERR(i2c_dev);
|
|
return PTR_ERR(i2c_dev);
|
|
|
|
|
|
/* register this i2c device with the driver core */
|
|
/* register this i2c device with the driver core */
|
|
- i2c_dev->dev = device_create(i2c_dev_class, &adap->dev,
|
|
|
|
- MKDEV(I2C_MAJOR, adap->nr),
|
|
|
|
- "i2c-%d", adap->nr);
|
|
|
|
|
|
+ i2c_dev->dev = device_create_drvdata(i2c_dev_class, &adap->dev,
|
|
|
|
+ MKDEV(I2C_MAJOR, adap->nr),
|
|
|
|
+ NULL, "i2c-%d", adap->nr);
|
|
if (IS_ERR(i2c_dev->dev)) {
|
|
if (IS_ERR(i2c_dev->dev)) {
|
|
res = PTR_ERR(i2c_dev->dev);
|
|
res = PTR_ERR(i2c_dev->dev);
|
|
goto error;
|
|
goto error;
|