Messages in this thread | | | From | Uwe Kleine-König <> | Subject | [PATCH 0/8] counter: Remove struct counter_device::priv | Date | Tue, 21 Dec 2021 11:45:38 +0100 |
| |
Hello,
similar to patch https://lore.kernel.org/r/4bde7cbd9e43a5909208102094444219d3154466.1640072891.git.vilhelm.gray@gmail.com the usage of struct counter_device::priv can be replaced by container_of which improves type safety and code size.
This series depends on above patch, converts the remaining drivers and finally drops struct counter_device::priv.
This series was compile tested using ARCH=arm allmodconfig with the following change:
config 104_QUAD_8 tristate "ACCES 104-QUAD-8 driver" - depends on PC104 && X86 + depends on PC104 && X86 || COMPILE_TEST select ISA_BUS_API
in drivers/counter/Kconfig.
Best regards Uwe
Uwe Kleine-König (8): counter: 104-quad-8: Use container_of instead of struct counter_device::priv counter: ftm-quaddec: Use container_of instead of struct counter_device::priv counter: intel-qeb: Use container_of instead of struct counter_device::priv counter: interrupt-cnt: Use container_of instead of struct counter_device::priv counter: microchip-tcp-capture: Use container_of instead of struct counter_device::priv counter: stm32-lptimer-cnt: Use container_of instead of struct counter_device::priv counter: stm32-timer-cnt: Use container_of instead of struct counter_device::priv counter: Remove unused member from struct counter_device
drivers/counter/104-quad-8.c | 64 +++++++++++++------------ drivers/counter/ftm-quaddec.c | 14 ++++-- drivers/counter/intel-qep.c | 24 ++++++---- drivers/counter/interrupt-cnt.c | 16 ++++--- drivers/counter/microchip-tcb-capture.c | 18 ++++--- drivers/counter/stm32-lptimer-cnt.c | 24 ++++++---- drivers/counter/stm32-timer-cnt.c | 24 ++++++---- drivers/counter/ti-eqep.c | 1 - include/linux/counter.h | 3 -- 9 files changed, 106 insertions(+), 82 deletions(-)
base-commit: fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf prerequisite-patch-id: 9459ad8bc78190558df9123f8bebe28ca1c396ea -- 2.33.0
| |