lkml.org 
[lkml]   [2022]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: dvb_frontends: make static read-only array fec_tab const
Date
The static array fec_tab is read-only so it make sense to make
it const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/media/dvb-frontends/stv0299.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb-frontends/stv0299.c b/drivers/media/dvb-frontends/stv0299.c
index 421395ea3334..fbfc912c1071 100644
--- a/drivers/media/dvb-frontends/stv0299.c
+++ b/drivers/media/dvb-frontends/stv0299.c
@@ -161,8 +161,9 @@ static int stv0299_set_FEC(struct stv0299_state *state, enum fe_code_rate fec)

static enum fe_code_rate stv0299_get_fec(struct stv0299_state *state)
{
- static enum fe_code_rate fec_tab[] = { FEC_2_3, FEC_3_4, FEC_5_6,
- FEC_7_8, FEC_1_2 };
+ static const enum fe_code_rate fec_tab[] = {
+ FEC_2_3, FEC_3_4, FEC_5_6, FEC_7_8, FEC_1_2
+ };
u8 index;

dprintk ("%s\n", __func__);
--
2.33.1
\
 
 \ /
  Last update: 2022-01-24 00:03    [W:0.059 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site