From: Sakari Ailus Date: Tue, 5 Aug 2014 11:01:08 +0000 (-0300) Subject: [media] smiapp: Fix power count handling X-Git-Tag: fixes-for-v3.18-merge-window~95^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58e43d90b9cb75b4dd42ba1481d83011fa7412df;p=pandora-kernel.git [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 Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed