Commit 2b7dc3b1 authored by Felipe Balbi's avatar Felipe Balbi

usb: chipidea: register debugging sysfs on our device

Don't register anything non-generic under
the gadget's device as we don't really *own*
it.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent e5b29b25
...@@ -1767,7 +1767,7 @@ static int udc_start(struct ci13xxx *ci) ...@@ -1767,7 +1767,7 @@ static int udc_start(struct ci13xxx *ci)
goto put_transceiver; goto put_transceiver;
} }
retval = dbg_create_files(&ci->gadget.dev); retval = dbg_create_files(ci->dev);
if (retval) if (retval)
goto unreg_device; goto unreg_device;
...@@ -1796,7 +1796,7 @@ static int udc_start(struct ci13xxx *ci) ...@@ -1796,7 +1796,7 @@ static int udc_start(struct ci13xxx *ci)
dev_err(dev, "error = %i\n", retval); dev_err(dev, "error = %i\n", retval);
remove_dbg: remove_dbg:
dbg_remove_files(&ci->gadget.dev); dbg_remove_files(ci->dev);
unreg_device: unreg_device:
device_unregister(&ci->gadget.dev); device_unregister(&ci->gadget.dev);
put_transceiver: put_transceiver:
...@@ -1836,7 +1836,7 @@ static void udc_stop(struct ci13xxx *ci) ...@@ -1836,7 +1836,7 @@ static void udc_stop(struct ci13xxx *ci)
if (ci->global_phy) if (ci->global_phy)
usb_put_phy(ci->transceiver); usb_put_phy(ci->transceiver);
} }
dbg_remove_files(&ci->gadget.dev); dbg_remove_files(ci->dev);
device_unregister(&ci->gadget.dev); device_unregister(&ci->gadget.dev);
/* my kobject is dynamic, I swear! */ /* my kobject is dynamic, I swear! */
memset(&ci->gadget, 0, sizeof(ci->gadget)); memset(&ci->gadget, 0, sizeof(ci->gadget));
......
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