[media] radio-shark2: constify radio_tea5777_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 13 Nov 2015 11:38:32 +0000 (09:38 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 17 Nov 2015 16:52:15 +0000 (14:52 -0200)
The radio_tea5777_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

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@osg.samsung.com>
drivers/media/radio/radio-shark2.c
drivers/media/radio/radio-tea5777.h

index 8654e0dc5c95376aa7140498e10af342b955d15a..0e65a85d52c6667dac78d175b365cfff17e9ec11 100644 (file)
@@ -137,7 +137,7 @@ static int shark_read_reg(struct radio_tea5777 *tea, u32 *reg_ret)
        return 0;
 }
 
-static struct radio_tea5777_ops shark_tea_ops = {
+static const struct radio_tea5777_ops shark_tea_ops = {
        .write_reg = shark_write_reg,
        .read_reg  = shark_read_reg,
 };
index 4ea43a90a151ed10604c57b01de530f5848cbbce..4bd942526a1bb83a07344074df77e3bfdec8dde5 100644 (file)
@@ -76,7 +76,7 @@ struct radio_tea5777 {
        u32 read_reg;
        u64 write_reg;
        struct mutex mutex;
-       struct radio_tea5777_ops *ops;
+       const struct radio_tea5777_ops *ops;
        void *private_data;
        u8 card[32];
        u8 bus_info[32];
This page took 0.02761 seconds and 5 git commands to generate.