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

Merge tag 'counter-updates-for-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next

William writes:

Counter updates for 6.16

An update to allow for larger count values in interrupt-cnt.

* tag 'counter-updates-for-6.16' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
counter: interrupt-cnt: Convert atomic_t -> atomic_long_t

+4 -4
+4 -4
drivers/counter/interrupt-cnt.c
··· 17 17 #define INTERRUPT_CNT_NAME "interrupt-cnt" 18 18 19 19 struct interrupt_cnt_priv { 20 - atomic_t count; 20 + atomic_long_t count; 21 21 struct gpio_desc *gpio; 22 22 int irq; 23 23 bool enabled; ··· 32 32 struct counter_device *counter = dev_id; 33 33 struct interrupt_cnt_priv *priv = counter_priv(counter); 34 34 35 - atomic_inc(&priv->count); 35 + atomic_long_inc(&priv->count); 36 36 37 37 counter_push_event(counter, COUNTER_EVENT_CHANGE_OF_STATE, 0); 38 38 ··· 96 96 { 97 97 struct interrupt_cnt_priv *priv = counter_priv(counter); 98 98 99 - *val = atomic_read(&priv->count); 99 + *val = atomic_long_read(&priv->count); 100 100 101 101 return 0; 102 102 } ··· 109 109 if (val != (typeof(priv->count.counter))val) 110 110 return -ERANGE; 111 111 112 - atomic_set(&priv->count, val); 112 + atomic_long_set(&priv->count, val); 113 113 114 114 return 0; 115 115 }