USB: gadget: s3c: get rid of debug compile warning
authorBo Shen <voice.shen@atmel.com>
Wed, 27 Aug 2014 09:28:18 +0000 (17:28 +0800)
committerChanho Park <chanho61.park@samsung.com>
Fri, 24 Jul 2015 07:30:02 +0000 (16:30 +0900)
When enable debug option to compile, it will give the following
warning, this patch is used to get rid of it.
--->8---
warning: 'flags' is used uninitialized in this function [-Wuninitialized]
---8<---

Signed-off-by: Bo Shen <voice.shen@atmel.com>
drivers/usb/gadget/s3c_udc_otg.c
drivers/usb/gadget/s3c_udc_otg_xfer_dma.c

index d3429c15de492de052297677b1cbe96be8a1003a..c0b0abad42fbaf41c74dc46e5902825132a8cecf 100644 (file)
@@ -302,7 +302,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
 {
        struct s3c_udc *dev = the_controller;
        int retval = 0;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        debug_cond(DEBUG_SETUP != 0, "%s: %s\n", __func__, "no name");
 
@@ -350,7 +350,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
 int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 {
        struct s3c_udc *dev = the_controller;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        if (!dev)
                return -ENODEV;
@@ -594,7 +594,7 @@ static int s3c_ep_enable(struct usb_ep *_ep,
 {
        struct s3c_ep *ep;
        struct s3c_udc *dev;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        debug("%s: %p\n", __func__, _ep);
 
@@ -658,7 +658,7 @@ static int s3c_ep_enable(struct usb_ep *_ep,
 static int s3c_ep_disable(struct usb_ep *_ep)
 {
        struct s3c_ep *ep;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        debug("%s: %p\n", __func__, _ep);
 
@@ -716,7 +716,7 @@ static int s3c_dequeue(struct usb_ep *_ep, struct usb_request *_req)
 {
        struct s3c_ep *ep;
        struct s3c_request *req;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        debug("%s: %p\n", __func__, _ep);
 
index 396c8c86c13343a45e13d98bf506cc3dcb3a2880..632e98b08f6fcd03e9387686cad2f9f61be966b3 100644 (file)
@@ -496,7 +496,7 @@ static int s3c_udc_irq(int irq, void *_dev)
        struct s3c_udc *dev = _dev;
        u32 intr_status;
        u32 usb_status, gintmsk;
-       unsigned long flags;
+       unsigned long flags = 0;
 
        spin_lock_irqsave(&dev->lock, flags);
 
@@ -615,7 +615,7 @@ static int s3c_queue(struct usb_ep *_ep, struct usb_request *_req,
        struct s3c_request *req;
        struct s3c_ep *ep;
        struct s3c_udc *dev;
-       unsigned long flags;
+       unsigned long flags = 0;
        u32 ep_num, gintsts;
 
        req = container_of(_req, struct s3c_request, req);
@@ -1063,7 +1063,7 @@ static int s3c_udc_set_halt(struct usb_ep *_ep, int value)
 {
        struct s3c_ep   *ep;
        struct s3c_udc  *dev;
-       unsigned long   flags;
+       unsigned long   flags = 0;
        u8              ep_num;
 
        ep = container_of(_ep, struct s3c_ep, ep);