media: ov13b10: Enable runtime PM before registering async sub-device
authorBingbu Cao <bingbu.cao@intel.com>
Wed, 22 Nov 2023 09:46:08 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:51 +0000 (16:18 -0800)
commit000339cb5d27f7c5b04ca9cecd75a3b73f7b8c34
tree839e7fb2e5623e19b2c1f8490c77e7c7f7b0490f
parent92d25e02ee1669e51ea4b74e656915d10b68d100
media: ov13b10: Enable runtime PM before registering async sub-device

commit 7b0454cfd8edb3509619407c3b9f78a6d0dee1a5 upstream.

As the sensor device maybe accessible right after its async sub-device is
registered, such as ipu-bridge will try to power up sensor by sensor's
client device's runtime PM from the async notifier callback, if runtime PM
is not enabled, it will fail.

So runtime PM should be ready before its async sub-device is registered
and accessible by others.

Fixes: 7ee850546822 ("media: Add sensor driver support for the ov13b10 camera.")
Cc: stable@vger.kernel.org
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/ov13b10.c