linux/drivers/counter
Uwe Kleine-König b56346ddbd counter: Use container_of instead of drvdata to track counter_device
The counter core uses drvdata to find a struct counter_device from a
struct device. However as the device is a member of struct counter_device,
the lookup can be done faster (and a bit type safe) using container_of.

There are no other users of drvdata, so the call to dev_set_drvdata can
go away, too.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211230150300.72196-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-30 17:44:05 +01:00
..
104-quad-8.c counter: 104-quad-8: Fix persistent enabled events bug 2021-12-21 10:32:08 +01:00
counter-chrdev.c counter: Fix use-after-free race condition for events_queue_size write 2021-10-21 13:02:47 +02:00
counter-chrdev.h counter: Add character device interface 2021-10-17 10:53:52 +01:00
counter-core.c counter: Use container_of instead of drvdata to track counter_device 2021-12-30 17:44:05 +01:00
counter-sysfs.c counter: Fix use-after-free race condition for events_queue_size write 2021-10-21 13:02:47 +02:00
counter-sysfs.h counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
ftm-quaddec.c counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
intel-qep.c counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
interrupt-cnt.c counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
Kconfig counter: 104-quad-8: Add IRQ support for the ACCES 104-QUAD-8 2021-10-17 10:55:55 +01:00
Makefile counter: Add character device interface 2021-10-17 10:53:52 +01:00
microchip-tcb-capture.c counter: microchip-tcb-capture: Tidy up a false kernel-doc /** marking. 2021-10-17 10:56:31 +01:00
stm32-lptimer-cnt.c counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
stm32-timer-cnt.c counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
ti-eqep.c counter: ti-eqep: Use container_of instead of struct counter_device::priv 2021-12-21 10:32:08 +01:00