提交 ff880348 编写于 作者: J Julia Lawall 提交者: Mauro Carvalho Chehab

[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: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 2874bf3e
...@@ -378,7 +378,7 @@ static int saa7134_go7007_send_firmware(struct go7007 *go, u8 *data, int len) ...@@ -378,7 +378,7 @@ static int saa7134_go7007_send_firmware(struct go7007 *go, u8 *data, int len)
return 0; return 0;
} }
static struct go7007_hpi_ops saa7134_go7007_hpi_ops = { static const struct go7007_hpi_ops saa7134_go7007_hpi_ops = {
.interface_reset = saa7134_go7007_interface_reset, .interface_reset = saa7134_go7007_interface_reset,
.write_interrupt = saa7134_go7007_write_interrupt, .write_interrupt = saa7134_go7007_write_interrupt,
.read_interrupt = saa7134_go7007_read_interrupt, .read_interrupt = saa7134_go7007_read_interrupt,
......
...@@ -250,7 +250,7 @@ struct go7007 { ...@@ -250,7 +250,7 @@ struct go7007 {
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
/* HPI driver */ /* HPI driver */
struct go7007_hpi_ops *hpi_ops; const struct go7007_hpi_ops *hpi_ops;
void *hpi_context; void *hpi_context;
int interrupt_available; int interrupt_available;
wait_queue_head_t interrupt_waitq; wait_queue_head_t interrupt_waitq;
......
...@@ -932,7 +932,7 @@ static void go7007_usb_release(struct go7007 *go) ...@@ -932,7 +932,7 @@ static void go7007_usb_release(struct go7007 *go)
kfree(go->hpi_context); 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, .interface_reset = go7007_usb_interface_reset,
.write_interrupt = go7007_usb_ezusb_write_interrupt, .write_interrupt = go7007_usb_ezusb_write_interrupt,
.read_interrupt = go7007_usb_read_interrupt, .read_interrupt = go7007_usb_read_interrupt,
...@@ -942,7 +942,7 @@ static struct go7007_hpi_ops go7007_usb_ezusb_hpi_ops = { ...@@ -942,7 +942,7 @@ static struct go7007_hpi_ops go7007_usb_ezusb_hpi_ops = {
.release = go7007_usb_release, .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, .interface_reset = go7007_usb_interface_reset,
.write_interrupt = go7007_usb_onboard_write_interrupt, .write_interrupt = go7007_usb_onboard_write_interrupt,
.read_interrupt = go7007_usb_read_interrupt, .read_interrupt = go7007_usb_read_interrupt,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册