media: i2c: dw9768: Fix pm_runtime_set_suspended() with runtime pm enabled
commit d6594d50 upstream. It is not valid to call pm_runtime_set_suspended() and pm_runtime_set_active() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, adjust the order to fix it. Cc: stable@vger.kernel.org Fixes: 5f9a089b ("dw9768: Enable low-power probe on ACPI") Suggested-by:Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading