counter: stm32-lptimer-cnt: Convert to new counter registration
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 30 Dec 2021 15:02:58 +0000 (16:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Dec 2021 16:44:07 +0000 (17:44 +0100)
commite75d678d041fe55c7289e2a3d36de9c4f0abbf97
tree17225827c0926d4b64255c695e00658b4bf3f22d
parente1717d2ea09fb83f3211bcc9ceeaf42fce58fae5
counter: stm32-lptimer-cnt: Convert to new counter registration

This fixes device lifetime issues where it was possible to free a live
struct device.

Fixes: 597f55e3f36c ("counter: stm32-lptimer: add counter device")
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-22-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/counter/stm32-lptimer-cnt.c