media: i2c: Re-order runtime pm initialisation
authorDaniel Scally <djrscally@gmail.com>
Tue, 23 Nov 2021 00:00:01 +0000 (01:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:19 +0000 (11:03 +0100)
commit9a11fe9e4467e38b1e6c5049d9e086809e287040
tree190d30a3cebef9b82aa03190d34f7188897a9747
parentadf57b861e7f01765cbc376b13fe88c2a942299b
media: i2c: Re-order runtime pm initialisation

[ Upstream commit d2484fbf780762f6f9cc3abb7a07ee42dca2eaa3 ]

The kerneldoc for pm_runtime_set_suspended() says:

"It is not valid to call this function for devices with runtime PM
enabled"

To satisfy that requirement, re-order the calls so that
pm_runtime_enable() is the last one.

Fixes: 11c0d8fdccc5 ("media: i2c: Add support for the OV8865 image sensor")
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/ov8865.c