Closing VCAP devices could be called without calling stream off: This problem would make VCAP resources taken by devices no longer running. Using unsigned variable to store signed result: This problem would allow stream on to continue even when function returned error. Fix problem of reading VP irq status register too early: It was possible for cadence detection bit to be propgated faster by only a few clock cycles then the picture done bit. When the irq status read was performed and by the time a write to the clear register was performed the picture done bit would propgate. Since the irq is rising edge triggered this would cause a problem and the irq would not be triggered until VP was reset. Remove unused code Change-Id: Iba72354c06287efb27178edf64d8d3f459dbf954 Signed-off-by: Terence Hampson <thampson@codeaurora.org>