media: smiapp: Register sensor after enabling runtime PM on the device
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 11 Oct 2019 11:16:02 +0000 (08:16 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:35:25 +0000 (16:35 +0100)
commit3e1e748979ff58bc01b8a6ab827af65242d80f58
tree95a3721a410287d8386cb92bf109175449999bdf
parent00f0f29495e5e504ae56c8bab534bca98ff1648e
media: smiapp: Register sensor after enabling runtime PM on the device

[ Upstream commit 90c9e4a4dba9f4de331372e745fb1991c1faa598 ]

Earlier it was possible that the parts of the driver that assumed runtime
PM was enabled were being called before runtime PM was enabled in the
driver's probe function. So enable runtime PM before registering the
sub-device.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/smiapp/smiapp-core.c