Commit a15e042e authored by Rupesh Gujare's avatar Rupesh Gujare Committed by Greg Kroah-Hartman

staging: ozwpan: Remove unneeded initializers

Remove variable initialization wherever it is not required.
Signed-off-by: default avatarRupesh Gujare <rupesh.gujare@atmel.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25403813
...@@ -67,7 +67,7 @@ void oz_elt_buf_term(struct oz_elt_buf *buf) ...@@ -67,7 +67,7 @@ void oz_elt_buf_term(struct oz_elt_buf *buf)
*/ */
struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf) struct oz_elt_info *oz_elt_info_alloc(struct oz_elt_buf *buf)
{ {
struct oz_elt_info *ei = NULL; struct oz_elt_info *ei;
spin_lock_bh(&buf->lock); spin_lock_bh(&buf->lock);
if (buf->free_elts && buf->elt_pool) { if (buf->free_elts && buf->elt_pool) {
......
...@@ -373,7 +373,7 @@ static void oz_complete_urb(struct usb_hcd *hcd, struct urb *urb, ...@@ -373,7 +373,7 @@ static void oz_complete_urb(struct usb_hcd *hcd, struct urb *urb,
{ {
struct oz_hcd *ozhcd = oz_hcd_private(hcd); struct oz_hcd *ozhcd = oz_hcd_private(hcd);
unsigned long irq_state; unsigned long irq_state;
struct oz_urb_link *cancel_urbl = NULL; struct oz_urb_link *cancel_urbl;
spin_lock_irqsave(&g_tasklet_lock, irq_state); spin_lock_irqsave(&g_tasklet_lock, irq_state);
usb_hcd_unlink_urb_from_ep(hcd, urb); usb_hcd_unlink_urb_from_ep(hcd, urb);
...@@ -585,7 +585,7 @@ static struct urb *oz_find_urb_by_id(struct oz_port *port, int ep_ix, ...@@ -585,7 +585,7 @@ static struct urb *oz_find_urb_by_id(struct oz_port *port, int ep_ix,
{ {
struct oz_hcd *ozhcd = port->ozhcd; struct oz_hcd *ozhcd = port->ozhcd;
struct urb *urb = NULL; struct urb *urb = NULL;
struct oz_urb_link *urbl = NULL; struct oz_urb_link *urbl;
struct oz_endpoint *ep; struct oz_endpoint *ep;
spin_lock_bh(&ozhcd->hcd_lock); spin_lock_bh(&ozhcd->hcd_lock);
...@@ -664,7 +664,7 @@ struct oz_port *oz_hcd_pd_arrived(void *hpd) ...@@ -664,7 +664,7 @@ struct oz_port *oz_hcd_pd_arrived(void *hpd)
{ {
int i; int i;
struct oz_port *hport = NULL; struct oz_port *hport = NULL;
struct oz_hcd *ozhcd = NULL; struct oz_hcd *ozhcd;
struct oz_endpoint *ep; struct oz_endpoint *ep;
ozhcd = oz_hcd_claim(); ozhcd = oz_hcd_claim();
...@@ -1423,7 +1423,7 @@ static void oz_clean_endpoints_for_config(struct usb_hcd *hcd, ...@@ -1423,7 +1423,7 @@ static void oz_clean_endpoints_for_config(struct usb_hcd *hcd,
*/ */
static void *oz_claim_hpd(struct oz_port *port) static void *oz_claim_hpd(struct oz_port *port)
{ {
void *hpd = NULL; void *hpd;
struct oz_hcd *ozhcd = port->ozhcd; struct oz_hcd *ozhcd = port->ozhcd;
spin_lock_bh(&ozhcd->hcd_lock); spin_lock_bh(&ozhcd->hcd_lock);
...@@ -1444,7 +1444,7 @@ static void oz_process_ep0_urb(struct oz_hcd *ozhcd, struct urb *urb, ...@@ -1444,7 +1444,7 @@ static void oz_process_ep0_urb(struct oz_hcd *ozhcd, struct urb *urb,
unsigned windex; unsigned windex;
unsigned wvalue; unsigned wvalue;
unsigned wlength; unsigned wlength;
void *hpd = NULL; void *hpd;
u8 req_id; u8 req_id;
int rc = 0; int rc = 0;
unsigned complete = 0; unsigned complete = 0;
...@@ -1798,7 +1798,7 @@ static int oz_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, ...@@ -1798,7 +1798,7 @@ static int oz_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags) gfp_t mem_flags)
{ {
struct oz_hcd *ozhcd = oz_hcd_private(hcd); struct oz_hcd *ozhcd = oz_hcd_private(hcd);
int rc = 0; int rc;
int port_ix; int port_ix;
struct oz_port *port; struct oz_port *port;
unsigned long irq_state; unsigned long irq_state;
...@@ -1851,7 +1851,7 @@ static int oz_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, ...@@ -1851,7 +1851,7 @@ static int oz_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
static struct oz_urb_link *oz_remove_urb(struct oz_endpoint *ep, static struct oz_urb_link *oz_remove_urb(struct oz_endpoint *ep,
struct urb *urb) struct urb *urb)
{ {
struct oz_urb_link *urbl = NULL; struct oz_urb_link *urbl;
struct list_head *e; struct list_head *e;
if (unlikely(ep == NULL)) if (unlikely(ep == NULL))
...@@ -1878,7 +1878,7 @@ static struct oz_urb_link *oz_remove_urb(struct oz_endpoint *ep, ...@@ -1878,7 +1878,7 @@ static struct oz_urb_link *oz_remove_urb(struct oz_endpoint *ep,
static int oz_hcd_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) static int oz_hcd_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
{ {
struct oz_hcd *ozhcd = oz_hcd_private(hcd); struct oz_hcd *ozhcd = oz_hcd_private(hcd);
struct oz_urb_link *urbl = NULL; struct oz_urb_link *urbl;
int rc; int rc;
unsigned long irq_state; unsigned long irq_state;
...@@ -2141,7 +2141,7 @@ static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex) ...@@ -2141,7 +2141,7 @@ static int oz_clear_port_feature(struct usb_hcd *hcd, u16 wvalue, u16 windex)
static int oz_get_port_status(struct usb_hcd *hcd, u16 windex, char *buf) static int oz_get_port_status(struct usb_hcd *hcd, u16 windex, char *buf)
{ {
struct oz_hcd *ozhcd; struct oz_hcd *ozhcd;
u32 status = 0; u32 status;
if ((windex < 1) || (windex > OZ_NB_PORTS)) if ((windex < 1) || (windex > OZ_NB_PORTS))
return -EPIPE; return -EPIPE;
......
...@@ -337,7 +337,7 @@ void oz_pd_heartbeat(struct oz_pd *pd, u16 apps) ...@@ -337,7 +337,7 @@ void oz_pd_heartbeat(struct oz_pd *pd, u16 apps)
*/ */
void oz_pd_stop(struct oz_pd *pd) void oz_pd_stop(struct oz_pd *pd)
{ {
u16 stop_apps = 0; u16 stop_apps;
oz_dbg(ON, "oz_pd_stop() State = 0x%x\n", pd->state); oz_dbg(ON, "oz_pd_stop() State = 0x%x\n", pd->state);
oz_pd_indicate_farewells(pd); oz_pd_indicate_farewells(pd);
...@@ -362,7 +362,7 @@ void oz_pd_stop(struct oz_pd *pd) ...@@ -362,7 +362,7 @@ void oz_pd_stop(struct oz_pd *pd)
int oz_pd_sleep(struct oz_pd *pd) int oz_pd_sleep(struct oz_pd *pd)
{ {
int do_stop = 0; int do_stop = 0;
u16 stop_apps = 0; u16 stop_apps;
oz_polling_lock_bh(); oz_polling_lock_bh();
if (pd->state & (OZ_PD_S_SLEEP | OZ_PD_S_STOPPED)) { if (pd->state & (OZ_PD_S_SLEEP | OZ_PD_S_STOPPED)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment