summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/go7007
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-12-11 17:16:48 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 10:34:07 +0100
commitff880348e74e0fd1196ab39ec765f5fd330ed3c6 (patch)
tree4fd3bb14c2415c207bb6ffd474d5566d489cc8ba /drivers/media/usb/go7007
parent[media] tc358743: Print timings only when debug level is set (diff)
downloadlinux-ff880348e74e0fd1196ab39ec765f5fd330ed3c6.tar.xz
linux-ff880348e74e0fd1196ab39ec765f5fd330ed3c6.zip
[media] go7007: constify go7007_hpi_ops structures
The go7007_hpi_ops structures are never modified, so declare them 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>
Diffstat (limited to 'drivers/media/usb/go7007')
-rw-r--r--drivers/media/usb/go7007/go7007-priv.h2
-rw-r--r--drivers/media/usb/go7007/go7007-usb.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/go7007/go7007-priv.h b/drivers/media/usb/go7007/go7007-priv.h
index 745185eb060b..bebee8ca9981 100644
--- a/drivers/media/usb/go7007/go7007-priv.h
+++ b/drivers/media/usb/go7007/go7007-priv.h
@@ -250,7 +250,7 @@ struct go7007 {
struct i2c_adapter i2c_adapter;
/* HPI driver */
- struct go7007_hpi_ops *hpi_ops;
+ const struct go7007_hpi_ops *hpi_ops;
void *hpi_context;
int interrupt_available;
wait_queue_head_t interrupt_waitq;
diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c
index 3dbf14c85c5c..14d3f8c1ce4a 100644
--- a/drivers/media/usb/go7007/go7007-usb.c
+++ b/drivers/media/usb/go7007/go7007-usb.c
@@ -932,7 +932,7 @@ static void go7007_usb_release(struct go7007 *go)
kfree(go->hpi_context);
}
-static struct go7007_hpi_ops go7007_usb_ezusb_hpi_ops = {
+static const struct go7007_hpi_ops go7007_usb_ezusb_hpi_ops = {
.interface_reset = go7007_usb_interface_reset,
.write_interrupt = go7007_usb_ezusb_write_interrupt,
.read_interrupt = go7007_usb_read_interrupt,
@@ -942,7 +942,7 @@ static struct go7007_hpi_ops go7007_usb_ezusb_hpi_ops = {
.release = go7007_usb_release,
};
-static struct go7007_hpi_ops go7007_usb_onboard_hpi_ops = {
+static const struct go7007_hpi_ops go7007_usb_onboard_hpi_ops = {
.interface_reset = go7007_usb_interface_reset,
.write_interrupt = go7007_usb_onboard_write_interrupt,
.read_interrupt = go7007_usb_read_interrupt,