GPIODEV: Fix open-count race condition.