diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2016-09-11 17:44:14 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-19 22:28:26 +0300 |
commit | 56e247a55a6bf256714e6bc46bd176341bce52aa (patch) | |
tree | 14b8237ef0fb27dd69c53962a100ef488a33f6f9 /drivers | |
parent | cafddc652cdb9aa81f7319001e42d755bf956c9d (diff) | |
download | linux-56e247a55a6bf256714e6bc46bd176341bce52aa.tar.xz |
[media] mxl111sf-tuner: constify dvb_tuner_ops structures
These structures are only used to copy into other structures, so declare
them as const.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct dvb_tuner_ops i@p = { ... };
@ok1@
identifier r.i;
expression e;
position p;
@@
e = i@p
@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
memcpy(e1, &i@p, e2)
@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct dvb_tuner_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct dvb_tuner_ops i = { ... };
// </smpl>
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')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c index 7d16252dbb71..f141dcc55cc9 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-tuner.c @@ -466,7 +466,7 @@ static int mxl111sf_tuner_release(struct dvb_frontend *fe) /* ------------------------------------------------------------------------- */ -static struct dvb_tuner_ops mxl111sf_tuner_tuner_ops = { +static const struct dvb_tuner_ops mxl111sf_tuner_tuner_ops = { .info = { .name = "MaxLinear MxL111SF", #if 0 |