media: imx355: Enable runtime PM before registering async sub-device
authorBingbu Cao <bingbu.cao@intel.com>
Wed, 22 Nov 2023 09:46:06 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:50 +0000 (16:18 -0800)
commit252ae106eacf2df59b58d02de79f2cbb48d257ee
treebc809cecd1b613059fd207c9f39a526423ec3c6b
parent532a5557da6892a6b2d5793052e1bce1f4c9e177
media: imx355: Enable runtime PM before registering async sub-device

commit efa5fe19c0a9199f49e36e1f5242ed5c88da617d 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: df0b5c4a7ddd ("media: add imx355 camera sensor driver")
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/imx355.c