]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: i2c: imx319: Rectify runtime PM handling probe and remove
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 10 Jan 2025 12:55:59 +0000 (14:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:37 +0000 (10:15 +0200)
commit99f929914713bff32737e703f67b39dedbb6bcc3
tree79f3be16a61208f598923e72f47e6ae7ffdcf366
parentbb3fd8b7906a12dc2b61389abb742bf6542d97fb
media: i2c: imx319: Rectify runtime PM handling probe and remove

commit 5f5ffd3bc62b2e6c478061918b10473d8b90ac2d upstream.

Idle the device only after the async sub-device has been successfully
registered. In error handling, set the device's runtime PM status to
suspended only if it has been set to active previously in probe.

Also set the device's runtime PM status to suspended in remove only if it
wasn't so already.

Fixes: 8a89dc62f28c ("media: add imx319 camera sensor driver")
Cc: stable@vger.kernel.org # for >= v6.12
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>
drivers/media/i2c/imx319.c