|
@@ -1564,6 +1564,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
|
|
dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name);
|
|
dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name);
|
|
|
|
|
|
pm_runtime_no_callbacks(&adap->dev);
|
|
pm_runtime_no_callbacks(&adap->dev);
|
|
|
|
+ pm_runtime_enable(&adap->dev);
|
|
|
|
|
|
#ifdef CONFIG_I2C_COMPAT
|
|
#ifdef CONFIG_I2C_COMPAT
|
|
res = class_compat_create_link(i2c_adapter_compat_class, &adap->dev,
|
|
res = class_compat_create_link(i2c_adapter_compat_class, &adap->dev,
|
|
@@ -1818,6 +1819,8 @@ void i2c_del_adapter(struct i2c_adapter *adap)
|
|
/* device name is gone after device_unregister */
|
|
/* device name is gone after device_unregister */
|
|
dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
|
|
dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
|
|
|
|
|
|
|
|
+ pm_runtime_disable(&adap->dev);
|
|
|
|
+
|
|
/* wait until all references to the device are gone
|
|
/* wait until all references to the device are gone
|
|
*
|
|
*
|
|
* FIXME: This is old code and should ideally be replaced by an
|
|
* FIXME: This is old code and should ideally be replaced by an
|