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>
This commit is contained in:
parent
69fea2b4e5
commit
0854fa22b9
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue