mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
hibyr1: fix USB gadget UDC unbind (empty write is a no-op)
usb_enable(false) wrote "" to the gadget UDC attribute to unbind it, but
sysfs_set_string("") doesn't do a write syscall.
This meant that live USB-mode switches did nothing and required a reboot to take effect.
Change-Id: I0fc9f54fdb2f529bfe24d5c1ed472c873401080e
This commit is contained in:
parent
b54b10dc6d
commit
adbb185f7b
1 changed files with 2 additions and 6 deletions
|
|
@ -95,12 +95,8 @@ void usb_enable(bool on)
|
|||
logf(">>>>>>>>>>>>>>>>> usb_enable(%d)\n", on);
|
||||
logf("usb enable %d %d\n", on, _usb_mode);
|
||||
|
||||
/* Ignore usb enable/disable when ADB is enabled so we can fireup adb shell
|
||||
* without entering ums mode
|
||||
*/
|
||||
//if (_usb_mode != USB_MODE_ADB) {
|
||||
sysfs_set_string("/sys/kernel/config/usb_gadget/adb_demo/UDC", on ? "13500000.otg_new" : "");
|
||||
//}
|
||||
sysfs_set_string("/sys/kernel/config/usb_gadget/adb_demo/UDC",
|
||||
on ? "13500000.otg_new" : "\n");
|
||||
}
|
||||
|
||||
/* This is called by usb thread after usb extract in order to return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue