summaryrefslogtreecommitdiffstats
path: root/drivers/counter/ftm-quaddec.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-12-30 16:02:38 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-30 17:44:05 +0100
commitb56346ddbd82f674db02453ecce60dd91f97b78c (patch)
tree6f7af09aad8eeba4879e89c448992c4ca49a68db /drivers/counter/ftm-quaddec.c
parent6b0b80ac103b2a40c72a47c301745fd1f4ef4697 (diff)
downloadlinux-stable-b56346ddbd82f674db02453ecce60dd91f97b78c.tar.gz
linux-stable-b56346ddbd82f674db02453ecce60dd91f97b78c.tar.bz2
linux-stable-b56346ddbd82f674db02453ecce60dd91f97b78c.zip
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>
Diffstat (limited to 'drivers/counter/ftm-quaddec.c')
0 files changed, 0 insertions, 0 deletions