]> git.baikalelectronics.ru Git - kernel.git/commit
[media] smiapp: Fix power count handling
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 5 Aug 2014 11:01:08 +0000 (08:01 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 11:50:25 +0000 (08:50 -0300)
commitb8ef8d8b33a96d12088d737cb1687c72b157336d
tree21c41543ca3c93b61e091eec2b09bb67b4eb3e0c
parentf45f9587f1dd1e89dd1c89561c9572f777c5bcb7
[media] smiapp: Fix power count handling

The sensor may be powered by either one of its sub-devices being accessed
from the user space (an open file handle) or by its s_power() op being
called with non-zero on argument. The driver counts the users and if any
reason to keep the device powered exists it will be powered.

However, a faulty condition was used in recognising the need to power off
the sensor, leading it to be powered off every time any of its uses went
away.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/smiapp/smiapp-core.c