Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'counter-fixes-for-6.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus

William writes:

First set of Counter fixes for 6.6

The counter_get_ext() function would incorrectly refer to the first
element of the extensions array to handle component array extensions
when they are located at a different index; a fix is provided to index
to the correct element in the array for this case. A fix for the
microchip-tcb-capture is provided as well to correct an inverted
internal GCLK logic for clock selection.

* tag 'counter-fixes-for-6.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
counter: microchip-tcb-capture: Fix the use of internal GCLK logic
counter: chrdev: fix getting array extensions

+3 -3
+2 -2
drivers/counter/counter-chrdev.c
··· 247 247 if (*id == component_id) 248 248 return 0; 249 249 250 - if (ext->type == COUNTER_COMP_ARRAY) { 251 - element = ext->priv; 250 + if (ext[*ext_idx].type == COUNTER_COMP_ARRAY) { 251 + element = ext[*ext_idx].priv; 252 252 253 253 if (component_id - *id < element->length) 254 254 return 0;
+1 -1
drivers/counter/microchip-tcb-capture.c
··· 97 97 priv->qdec_mode = 0; 98 98 /* Set highest rate based on whether soc has gclk or not */ 99 99 bmr &= ~(ATMEL_TC_QDEN | ATMEL_TC_POSEN); 100 - if (priv->tc_cfg->has_gclk) 100 + if (!priv->tc_cfg->has_gclk) 101 101 cmr |= ATMEL_TC_TIMER_CLOCK2; 102 102 else 103 103 cmr |= ATMEL_TC_TIMER_CLOCK1;