[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211221104546.214066-1-u.kleine-koenig@pengutronix.de>
Date: Tue, 21 Dec 2021 11:45:38 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Alexandre Torgue <alexandre.torgue@...s.st.com>,
David Lechner <david@...hnology.com>,
Fabrice Gasnier <fabrice.gasnier@...s.st.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Kamel Bouhara <kamel.bouhara@...tlin.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Oleksij Rempel <linux@...pel-privat.de>,
Patrick Havelange <patrick.havelange@...ensium.com>,
Syed Nayyar Waris <syednwaris@...il.com>,
William Breathitt Gray <vilhelm.gray@...il.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com
Subject: [PATCH 0/8] counter: Remove struct counter_device::priv
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
Powered by blists - more mailing lists