diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2016-09-11 10:05:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-19 16:22:18 -0300 |
commit | db83d08dee3324dc8b0bf0d02ba295ba25a01758 (patch) | |
tree | 8c51e0016fbae83773b5a71bff563a4e3fbeb87f /drivers/media/pci/ddbridge | |
parent | 10accd2e6890b57db8e717e9aee91b791f90fe14 (diff) |
[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 <joe@perches.com>.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/ddbridge')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-core.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index 47def73b3502..18e3a4deee64 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c @@ -1643,53 +1643,53 @@ fail: /******************************************************************************/ /******************************************************************************/ -static struct ddb_info ddb_none = { +static const struct ddb_info ddb_none = { .type = DDB_NONE, .name = "Digital Devices PCIe bridge", }; -static struct ddb_info ddb_octopus = { +static const struct ddb_info ddb_octopus = { .type = DDB_OCTOPUS, .name = "Digital Devices Octopus DVB adapter", .port_num = 4, }; -static struct ddb_info ddb_octopus_le = { +static const struct ddb_info ddb_octopus_le = { .type = DDB_OCTOPUS, .name = "Digital Devices Octopus LE DVB adapter", .port_num = 2, }; -static struct ddb_info ddb_octopus_mini = { +static const struct ddb_info ddb_octopus_mini = { .type = DDB_OCTOPUS, .name = "Digital Devices Octopus Mini", .port_num = 4, }; -static struct ddb_info ddb_v6 = { +static const struct ddb_info ddb_v6 = { .type = DDB_OCTOPUS, .name = "Digital Devices Cine S2 V6 DVB adapter", .port_num = 3, }; -static struct ddb_info ddb_v6_5 = { +static const struct ddb_info ddb_v6_5 = { .type = DDB_OCTOPUS, .name = "Digital Devices Cine S2 V6.5 DVB adapter", .port_num = 4, }; -static struct ddb_info ddb_dvbct = { +static const struct ddb_info ddb_dvbct = { .type = DDB_OCTOPUS, .name = "Digital Devices DVBCT V6.1 DVB adapter", .port_num = 3, }; -static struct ddb_info ddb_satixS2v3 = { +static const struct ddb_info ddb_satixS2v3 = { .type = DDB_OCTOPUS, .name = "Mystique SaTiX-S2 V3 DVB adapter", .port_num = 3, }; -static struct ddb_info ddb_octopusv3 = { +static const struct ddb_info ddb_octopusv3 = { .type = DDB_OCTOPUS, .name = "Digital Devices Octopus V3 DVB adapter", .port_num = 4, |