aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/counter
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-09-22 22:19:41 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-09-23 20:53:58 +0100
commit0854fa22b9dc43cb4a4140938849dc9fd2427e3a (patch)
tree76766977e07a9e0b5c004e3b01cf7d8ef207bb6c /drivers/counter
parentstaging: r8188eu: replace WIFI_REASON_CODE enum with native ieee80211_reasoncode (diff)
downloadlinux-dev-0854fa22b9dc43cb4a4140938849dc9fd2427e3a.tar.xz
linux-dev-0854fa22b9dc43cb4a4140938849dc9fd2427e3a.zip
counter: microchip-tcb-capture: Constify mchp_tc_ops
The only usage of mchp_tc_ops is to assign its address to the ops field in the counter_device struct which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/20200922201941.41328-1-rikard.falkeborn@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/counter')
-rw-r--r--drivers/counter/microchip-tcb-capture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c
index b7b252c5addf..039c54a78aa5 100644
--- a/drivers/counter/microchip-tcb-capture.c
+++ b/drivers/counter/microchip-tcb-capture.c
@@ -253,7 +253,7 @@ static struct counter_count mchp_tc_counts[] = {
},
};
-static struct counter_ops mchp_tc_ops = {
+static const struct counter_ops mchp_tc_ops = {
.signal_read = mchp_tc_count_signal_read,
.count_read = mchp_tc_count_read,
.function_get = mchp_tc_count_function_get,