|
@@ -1735,10 +1735,9 @@ static int ov13858_probe(struct i2c_client *client,
|
|
|
* Device is already turned on by i2c-core with ACPI domain PM.
|
|
|
* Enable runtime PM and turn off the device.
|
|
|
*/
|
|
|
- pm_runtime_get_noresume(&client->dev);
|
|
|
pm_runtime_set_active(&client->dev);
|
|
|
pm_runtime_enable(&client->dev);
|
|
|
- pm_runtime_put(&client->dev);
|
|
|
+ pm_runtime_idle(&client->dev);
|
|
|
|
|
|
return 0;
|
|
|
|
|
@@ -1761,14 +1760,7 @@ static int ov13858_remove(struct i2c_client *client)
|
|
|
media_entity_cleanup(&sd->entity);
|
|
|
ov13858_free_controls(ov13858);
|
|
|
|
|
|
- /*
|
|
|
- * Disable runtime PM but keep the device turned on.
|
|
|
- * i2c-core with ACPI domain PM will turn off the device.
|
|
|
- */
|
|
|
- pm_runtime_get_sync(&client->dev);
|
|
|
pm_runtime_disable(&client->dev);
|
|
|
- pm_runtime_set_suspended(&client->dev);
|
|
|
- pm_runtime_put_noidle(&client->dev);
|
|
|
|
|
|
return 0;
|
|
|
}
|