gpio: workaround for immediate return from poll

Read gpio value before waiting for changes, otherwise poll() returns
immediately.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>