linux/drivers/usb/gadget/udc
Bhumika Goyal 5954a5046b usb: gadget: constify usb_gadget_ops structures
Declare usb_gadget_ops structures as const as they are only stored in
the ops field of a usb_gadget structure. This field is of type const, so
usb_gadget_ops structures having this property can be declared const
too.
Done using Coccinelle:

@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct usb_gadget_ops i@p={...};

@ok1@
identifier r1.i;
position p;
struct fotg210_udc fotg210;
@@
fotg210.gadget.ops=&i@p

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct usb_gadget_ops i;

File size before:
   text	   data	    bss	    dec	    hex	filename
   7559	    384	      8	   7951	   1f0f	usb/gadget/udc/fotg210-udc.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   7655	    288	      8	   7951	   1f0f	usb/gadget/udc/fotg210-udc.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19 10:34:45 +01:00
..
bdc usb: gadget: udc: bdc: remove unnecessary & operation 2016-11-03 10:38:25 +02:00
amd5536udc.c usb: gadget: fix unused-but-set-variale warnings 2016-06-21 11:04:09 +03:00
amd5536udc.h usb: gadget: amd5536udc: remove unnecessary conditions 2015-10-01 12:40:20 -05:00
at91_udc.c usb: gadget: udc: at91: use PTR_ERR_OR_ZERO() 2016-04-14 09:24:38 +03:00
at91_udc.h usb: Convert pr_warning to pr_warn 2016-11-03 10:38:36 +02:00
atmel_usba_udc.c usb: Convert pr_warning to pr_warn 2016-11-03 10:38:36 +02:00
atmel_usba_udc.h usb: gadget: atmel: access the PMC using regmap 2016-02-17 17:53:03 +01:00
bcm63xx_udc.c treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
core.c usb: gadget: udc: core: fix return code of usb_gadget_probe_driver() 2017-01-02 10:55:29 +02:00
dummy_hcd.c USB: dummy-hcd: fix bug in stop_activity (handle ep0) 2017-01-02 10:55:28 +02:00
fotg210-udc.c usb: gadget: constify usb_gadget_ops structures 2017-01-19 10:34:45 +01:00
fotg210.h
fsl_mxc_udc.c
fsl_qe_udc.c Merge 4.8-rc5 into usb-testing 2016-09-05 08:07:58 +02:00
fsl_qe_udc.h
fsl_udc_core.c usb: gadget: udc: fsl: remove unnecessary & operation 2016-11-03 10:38:28 +02:00
fsl_usb2_udc.h usb: Convert pr_warning to pr_warn 2016-11-03 10:38:36 +02:00
fusb300_udc.c usb: gadget: udc: fusb300: make use of new usb_endpoint_maxp_mult() 2016-11-03 10:38:19 +02:00
fusb300_udc.h usb: gadget: fusb300_udc.h: Fix typo in include guard 2014-09-03 09:15:57 -05:00
goku_udc.c usb: gadget: udc: goku_udc: don't print on ENOMEM 2016-08-30 19:17:37 +02:00
goku_udc.h
gr_udc.c usb: gadget: udc: gr: make use of new usb_endpoint_maxp_mult() 2016-11-03 10:38:19 +02:00
gr_udc.h usb: gadget: gr_udc: Add bounce buffer to handle odd sized OUT requests 2014-09-16 10:01:45 -05:00
Kconfig usb: gadget: net2280: add USB2380 support 2016-06-20 12:30:03 +03:00
lpc32xx_udc.c usb: udc: lpc32xx: remove USB PLL and USB OTG clock management 2016-03-04 15:14:49 +02:00
m66592-udc.c usb: Convert pr_warning to pr_warn 2016-11-03 10:38:36 +02:00
m66592-udc.h
Makefile usb: gadget: add tracepoints to the gadget API 2016-06-21 10:38:41 +03:00
mv_u3d_core.c usb: gadget: mv_u3d: mv_u3d_start_queue() refactoring 2016-11-08 12:52:14 +02:00
mv_u3d.h
mv_udc_core.c usb: gadget: udc: mv: remove unnecessary & operation 2016-11-03 10:38:28 +02:00
mv_udc.h
net2272.c usb: gadget: udc: net2272: remove unnecessary & operation 2016-11-03 10:38:26 +02:00
net2272.h usb: gadget: net2272: use common is_selfpowered 2015-01-29 10:35:27 -06:00
net2280.c usb: gadget: udc: net2280: remove unnecessary & operation 2016-11-03 10:38:26 +02:00
net2280.h usb: gadget: net2280: add USB2380 support 2016-06-20 12:30:03 +03:00
omap_udc.c usb: gadget: use IS_ENABLED() instead of checking for built-in or module 2016-09-02 14:36:33 +02:00
omap_udc.h usb: Convert pr_warning to pr_warn 2016-11-03 10:38:36 +02:00
pch_udc.c usb: gadget: pch_udc: reorder spin_[un]lock to avoid deadlock 2016-06-21 13:18:23 +03:00
pxa25x_udc.c usb: gadget: pxa25x_udc: document endianess better 2016-03-04 15:14:31 +02:00
pxa25x_udc.h usb: Convert pr_warning to pr_warn 2016-11-03 10:38:36 +02:00
pxa27x_udc.c usb: gadget: pxa27x: add phy notifier event handler 2016-08-25 12:13:06 +03:00
pxa27x_udc.h usb: gadget: pxa27x_udc: add ep capabilities support 2015-08-04 12:26:52 -05:00
r8a66597-udc.c usb: gadget: r8a66597: fix unused-but-set-variable warnings 2016-06-21 11:04:32 +03:00
r8a66597-udc.h
renesas_usb3.c usb: gadget: udc: renesas-usb3: clear VBOUT bit in DRD_CON 2016-09-05 13:39:23 +03:00
s3c2410_udc.c usb: gadget: udc: s3c2410: remove unnecessary & operation 2016-11-03 10:38:27 +02:00
s3c2410_udc.h
s3c-hsudc.c usb: gadget: s3c-hsudc: remove redundant condition 2015-12-16 10:07:27 -06:00
trace.c usb: gadget: add tracepoints to the gadget API 2016-06-21 10:38:41 +03:00
trace.h usb: gadget: add tracepoints to the gadget API 2016-06-21 10:38:41 +03:00
udc-xilinx.c usb: gadget: udc: udc-xilinx: don't print on ENOMEM 2016-08-30 19:17:37 +02:00