From db83d08dee3324dc8b0bf0d02ba295ba25a01758 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Sun, 11 Sep 2016 10:05:55 -0300 Subject: [media] constify local structures For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches . Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/smipcie/smipcie-main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/media/pci/smipcie') diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c index 83981d611a79..6dbe3b4d09ce 100644 --- a/drivers/media/pci/smipcie/smipcie-main.c +++ b/drivers/media/pci/smipcie/smipcie-main.c @@ -1060,7 +1060,7 @@ static void smi_remove(struct pci_dev *pdev) } /* DVBSky cards */ -static struct smi_cfg_info dvbsky_s950_cfg = { +static const struct smi_cfg_info dvbsky_s950_cfg = { .type = SMI_DVBSKY_S950, .name = "DVBSky S950 V3", .ts_0 = SMI_TS_NULL, @@ -1070,7 +1070,7 @@ static struct smi_cfg_info dvbsky_s950_cfg = { .rc_map = RC_MAP_DVBSKY, }; -static struct smi_cfg_info dvbsky_s952_cfg = { +static const struct smi_cfg_info dvbsky_s952_cfg = { .type = SMI_DVBSKY_S952, .name = "DVBSky S952 V3", .ts_0 = SMI_TS_DMA_BOTH, @@ -1080,7 +1080,7 @@ static struct smi_cfg_info dvbsky_s952_cfg = { .rc_map = RC_MAP_DVBSKY, }; -static struct smi_cfg_info dvbsky_t9580_cfg = { +static const struct smi_cfg_info dvbsky_t9580_cfg = { .type = SMI_DVBSKY_T9580, .name = "DVBSky T9580 V3", .ts_0 = SMI_TS_DMA_BOTH, @@ -1090,7 +1090,7 @@ static struct smi_cfg_info dvbsky_t9580_cfg = { .rc_map = RC_MAP_DVBSKY, }; -static struct smi_cfg_info technotrend_s2_4200_cfg = { +static const struct smi_cfg_info technotrend_s2_4200_cfg = { .type = SMI_TECHNOTREND_S2_4200, .name = "TechnoTrend TT-budget S2-4200 Twin", .ts_0 = SMI_TS_DMA_BOTH, -- cgit v1.2.3