Merge tag 'counter-fixes-for-6.6a' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / counter / microchip-tcb-capture.c
index 975e431..b3e615c 100644 (file)
@@ -97,7 +97,7 @@ static int mchp_tc_count_function_write(struct counter_device *counter,
                priv->qdec_mode = 0;
                /* Set highest rate based on whether soc has gclk or not */
                bmr &= ~(ATMEL_TC_QDEN | ATMEL_TC_POSEN);
-               if (priv->tc_cfg->has_gclk)
+               if (!priv->tc_cfg->has_gclk)
                        cmr |= ATMEL_TC_TIMER_CLOCK2;
                else
                        cmr |= ATMEL_TC_TIMER_CLOCK1;