usb: renesas_usbhs: remove the_controller_link
current renesas_usbhs is using new style udc_start/stop from af1d7056a5c1e5eaaf807ddd1423101db84668d0 (usb: gadget: renesas: convert to new style). with this patch we can finally remove the global "the_controller_link" Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
dfbb7f4fba
commit
b294b20336
@ -45,7 +45,6 @@ struct usbhsg_uep {
|
|||||||
struct usbhsg_gpriv {
|
struct usbhsg_gpriv {
|
||||||
struct usb_gadget gadget;
|
struct usb_gadget gadget;
|
||||||
struct usbhs_mod mod;
|
struct usbhs_mod mod;
|
||||||
struct list_head link;
|
|
||||||
|
|
||||||
struct usbhsg_uep *uep;
|
struct usbhsg_uep *uep;
|
||||||
int uep_size;
|
int uep_size;
|
||||||
@ -115,16 +114,6 @@ struct usbhsg_recip_handle {
|
|||||||
#define usbhsg_status_clr(gp, b) (gp->status &= ~b)
|
#define usbhsg_status_clr(gp, b) (gp->status &= ~b)
|
||||||
#define usbhsg_status_has(gp, b) (gp->status & b)
|
#define usbhsg_status_has(gp, b) (gp->status & b)
|
||||||
|
|
||||||
/* controller */
|
|
||||||
LIST_HEAD(the_controller_link);
|
|
||||||
|
|
||||||
#define usbhsg_for_each_controller(gpriv)\
|
|
||||||
list_for_each_entry(gpriv, &the_controller_link, link)
|
|
||||||
#define usbhsg_controller_register(gpriv)\
|
|
||||||
list_add_tail(&(gpriv)->link, &the_controller_link)
|
|
||||||
#define usbhsg_controller_unregister(gpriv)\
|
|
||||||
list_del_init(&(gpriv)->link)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* queue push/pop
|
* queue push/pop
|
||||||
*/
|
*/
|
||||||
@ -1032,8 +1021,6 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
usbhsg_controller_register(gpriv);
|
|
||||||
|
|
||||||
ret = usb_add_gadget_udc(dev, &gpriv->gadget);
|
ret = usb_add_gadget_udc(dev, &gpriv->gadget);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_register;
|
goto err_register;
|
||||||
@ -1062,8 +1049,6 @@ void usbhs_mod_gadget_remove(struct usbhs_priv *priv)
|
|||||||
|
|
||||||
device_unregister(&gpriv->gadget.dev);
|
device_unregister(&gpriv->gadget.dev);
|
||||||
|
|
||||||
usbhsg_controller_unregister(gpriv);
|
|
||||||
|
|
||||||
kfree(gpriv->uep);
|
kfree(gpriv->uep);
|
||||||
kfree(gpriv);
|
kfree(gpriv);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user