summaryrefslogtreecommitdiffstats
path: root/drivers/usb/isp1760/isp1760-udc.c
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-10 19:50:04 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-19 10:34:45 +0100
commit5954a5046b32637535eb819a478a11ab5b84be80 (patch)
tree03a8e6f7bea829f8e725fa31a0a1913c759f0875 /drivers/usb/isp1760/isp1760-udc.c
parentusb: hcd: initialize hcd->flags to 0 when rm hcd (diff)
downloadlinux-5954a5046b32637535eb819a478a11ab5b84be80.tar.xz
linux-5954a5046b32637535eb819a478a11ab5b84be80.zip
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>
Diffstat (limited to 'drivers/usb/isp1760/isp1760-udc.c')
0 files changed, 0 insertions, 0 deletions