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:44:19 +0000 (16:44 +0100)
commit6c6a03baece97469b2d041ebbc1f27b40d294a2d
tree2c142ca68582f82af8053095106fcc9dbf8d0911
parentb349a5897cf53955678e0bc7e099fc31fbebc821
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