Since renesas_usbhs mod_host didn't use struct completion as static object, the warning of lockdep came out. This patch fixup this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- drivers/usb/renesas_usbhs/mod_host.c | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index 1a7208a..0d42015 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c @@ -103,8 +103,6 @@ struct usbhsh_hpriv { u32 port_stat; /* USB_PORT_STAT_xxx */ - struct completion *done; - /* see usbhsh_req_alloc/free */ struct list_head ureq_link_active; struct list_head ureq_link_free; @@ -522,6 +520,7 @@ static int usbhsh_queue_push(struct usb_hcd *hcd, /* * DCP setup stage */ +static DECLARE_COMPLETION(setup_ack_done); static int usbhsh_is_request_address(struct urb *urb) { struct usb_ctrlrequest *cmd; @@ -549,8 +548,7 @@ static void usbhsh_setup_stage_packet_push(struct usbhsh_hpriv *hpriv, * usbhsh_irq_setup_ack() * usbhsh_irq_setup_err() */ - DECLARE_COMPLETION(done); - hpriv->done = &done; + init_completion(&setup_ack_done); /* copy original request */ memcpy(&req, urb->setup_packet, sizeof(struct usb_ctrlrequest)); @@ -572,8 +570,7 @@ static void usbhsh_setup_stage_packet_push(struct usbhsh_hpriv *hpriv, /* * wait setup packet ACK */ - wait_for_completion(&done); - hpriv->done = NULL; + wait_for_completion(&setup_ack_done); dev_dbg(dev, "%s done\n", __func__); } @@ -1090,15 +1087,11 @@ static int usbhsh_irq_dtch(struct usbhs_priv *priv, static int usbhsh_irq_setup_ack(struct usbhs_priv *priv, struct usbhs_irq_state *irq_state) { - struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); struct device *dev = usbhs_priv_to_dev(priv); dev_dbg(dev, "setup packet OK\n"); - if (unlikely(!hpriv->done)) - dev_err(dev, "setup ack happen without necessary data\n"); - else - complete(hpriv->done); /* see usbhsh_urb_enqueue() */ + complete(&setup_ack_done); /* see usbhsh_urb_enqueue() */ return 0; } @@ -1106,15 +1099,11 @@ static int usbhsh_irq_setup_ack(struct usbhs_priv *priv, static int usbhsh_irq_setup_err(struct usbhs_priv *priv, struct usbhs_irq_state *irq_state) { - struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv); struct device *dev = usbhs_priv_to_dev(priv); dev_dbg(dev, "setup packet Err\n"); - if (unlikely(!hpriv->done)) - dev_err(dev, "setup err happen without necessary data\n"); - else - complete(hpriv->done); /* see usbhsh_urb_enqueue() */ + complete(&setup_ack_done); /* see usbhsh_urb_enqueue() */ return 0; } @@ -1279,7 +1268,6 @@ int __devinit usbhs_mod_host_probe(struct usbhs_priv *priv) hpriv->mod.stop = usbhsh_stop; hpriv->pipe_info = pipe_info; hpriv->pipe_size = pipe_size; - hpriv->done = NULL; usbhsh_req_list_init(hpriv); usbhsh_port_stat_init(hpriv); -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html