counter: Consolidate Counter extension sysfs attribute creation
authorWilliam Breathitt Gray <william.gray@linaro.org>
Tue, 27 Sep 2022 22:53:41 +0000 (18:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Sep 2022 12:32:35 +0000 (14:32 +0200)
commitbb4bbbec664ffdb4652bf3d5daf7c930e68e5c40
treecd3ff87641208f238eee21b59864a50d48b4b9f0
parent45d2918520b2d8e640e4fb3fbf664dfb823dc520
counter: Consolidate Counter extension sysfs attribute creation

Counter extensions are handled for the Device, Counts, and Signals. The
code loops through each Counter extension and creates the expected sysfs
attributes. This patch consolidates that code into functions to reduce
redundancy and make the intention of the code clearer.

Link: https://lore.kernel.org/r/6f2121cf52073028c119dbf981a8b72f3eb625d2.1664204990.git.william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/0469c3ae3fbccbca908993c78d94f221761a6a3a.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/counter/counter-sysfs.c