usb: dwc2: gadget: make usb_ep_ops const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 12 Aug 2017 12:04:55 +0000 (17:34 +0530)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 Aug 2017 11:18:54 +0000 (14:18 +0300)
Make the structure const as it is only stored in the ops field of a
usb_ep structure, which is of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index c4066cd77e47345bc1f31791ba9955c80a12d452..0d8e09ccb59c09e92b807ffdaf2fbf14f80fe018 100644 (file)
@@ -4179,7 +4179,7 @@ static int dwc2_hsotg_ep_sethalt_lock(struct usb_ep *ep, int value)
        return ret;
 }
 
-static struct usb_ep_ops dwc2_hsotg_ep_ops = {
+static const struct usb_ep_ops dwc2_hsotg_ep_ops = {
        .enable         = dwc2_hsotg_ep_enable,
        .disable        = dwc2_hsotg_ep_disable,
        .alloc_request  = dwc2_hsotg_ep_alloc_request,