[PATCH] counter: 104-quad-8: Fix race getting function mode and direction