Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] drivers/media/usb/as102: constify as102_priv_ops_t structure

The as102_priv_ops_t 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>

authored by

Julia Lawall and committed by
Mauro Carvalho Chehab
f691ba98 242c5033

+2 -2
+1 -1
drivers/media/usb/as102/as102_drv.h
··· 52 52 struct as10x_cmd_t *cmd, *rsp; 53 53 54 54 /* bus adapter private ops callback */ 55 - struct as102_priv_ops_t *ops; 55 + const struct as102_priv_ops_t *ops; 56 56 }; 57 57 58 58 struct as102_dev_t {
+1 -1
drivers/media/usb/as102/as102_usb_drv.c
··· 189 189 return actual_len; 190 190 } 191 191 192 - static struct as102_priv_ops_t as102_priv_ops = { 192 + static const struct as102_priv_ops_t as102_priv_ops = { 193 193 .upload_fw_pkt = as102_send_ep1, 194 194 .xfer_cmd = as102_usb_xfer_cmd, 195 195 .as102_read_ep2 = as102_read_ep2,