continue read file when returned count > 0

In android, we met a lot of watchdog timeout which
caused by read file "/d/wakeup_sources".

The root cause is that in kernel side wakeup.c, it uses single_open()
interface to show the stats. But single_open() interface
requires that the whole output must fit into a single
buffer(physical continuous). This will lead to timeout when system
memory is not in a good situation.

Problem in kenrel side has been merged in [1]. Then kernel will return
max a page bytes to user space. So in KernelWakelockReader, we
need to read again when returned count > 0.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.0-rc4&id=00ee22c28915d111ba415750a3311d7678fd1206

Change-Id: If7886514c609c8d6338532c67c1cee79f2754ab1
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
1 file changed