[media] saa7146: make saa7146_use_ops const
Make these const as they are not modified in the file referencing them. They are only used when their function pointer fields invokes a function and therefore none of the structure fields are getting modified. Also, add a const to the declaration in the header. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
022565200a
commit
ad62701720
@@ -488,7 +488,7 @@ static ssize_t vbi_read(struct file *file, char __user *data, size_t count, loff
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct saa7146_use_ops saa7146_vbi_uops = {
|
||||
const struct saa7146_use_ops saa7146_vbi_uops = {
|
||||
.init = vbi_init,
|
||||
.open = vbi_open,
|
||||
.release = vbi_close,
|
||||
|
@@ -1303,7 +1303,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct saa7146_use_ops saa7146_video_uops = {
|
||||
const struct saa7146_use_ops saa7146_video_uops = {
|
||||
.init = video_init,
|
||||
.open = video_open,
|
||||
.release = video_close,
|
||||
|
Reference in New Issue
Block a user