Commit 4f53cf48 authored by spiiroin's avatar spiiroin

[usb_moded] Drop --android-bootup-function option. JB#41748

The target is to always have android usb enabled with valid function, so
this workaround is not relevant anymore.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent 7a386e38
......@@ -178,23 +178,6 @@ bool android_init_values(void)
/* For rndis to be discovered correctly in M$ Windows (vista and later) */
write_to_file("/sys/class/android_usb/f_rndis/wceis", "1");
/* Some devices can have enumeration issues due to incomplete
* configuration on the 1st connect after bootup. Briefly setting
* up for example mass_storage function can be utilized as a
* workaround in such cases. */
if(!usbmoded_init_done_p()) {
const char *function = usbmoded_get_android_bootup_function();
if(function) {
write_to_file(ANDROID0_FUNCTIONS, function);
write_to_file(ANDROID0_ENABLE, "1");
write_to_file(ANDROID0_ENABLE, "0");
}
}
/* Clear functions and enable */
write_to_file(ANDROID0_FUNCTIONS, "none");
write_to_file(ANDROID0_ENABLE, "1");
EXIT:
return android_in_use();
}
......
......@@ -203,9 +203,6 @@ void usbmoded_set_charger_connected (bool state);
// ----------------------------------------------------------------
// internal movements
// ...
const char *usbmoded_get_android_bootup_function (void);
void usbmoded_set_android_bootup_function (const char *function);
static void usbmoded_set_cable_connection_delay (int delay_ms);
......@@ -273,9 +270,6 @@ static bool android_ignore_next_udev_disconnect_event = false;
static bool systemd_notify = false;
#endif
/** Optional android usb function to setup during bootup */
static gchar *android_bootup_function = 0;
/** Currently allowed cable detection delay
*/
int usbmoded_cable_connection_delay = CABLE_CONNECTION_DELAY_DEFAULT;
......@@ -888,26 +882,6 @@ EXIT:
return;
}
/** Get android usb function to setup during bootup
*
* @returns function name, or NULL if no function was requested
*/
const char *usbmoded_get_android_bootup_function(void)
{
return android_bootup_function;
}
/** Set android usb function to setup during bootup
*
* @param function usb function name, or NULL
*/
void usbmoded_set_android_bootup_function(const char *function)
{
char *value = function ? g_strdup(function) : 0;
g_free(android_bootup_function);
android_bootup_function = value;
}
/** Helper for setting allowed cable detection delay
*
* Used for implementing --max-cable-delay=<ms> option.
......@@ -1787,7 +1761,7 @@ int main(int argc, char* argv[])
break;
case 'b':
usbmoded_set_android_bootup_function(optarg);
log_warning("Deprecated option: --android-bootup-function");
break;
default:
......@@ -1995,8 +1969,6 @@ EXIT:
# endif
#endif
usbmoded_set_android_bootup_function(0);
/* Must be done just before exit to make sure no more wakelocks
* are taken and left behind on exit path */
usbmoded_allow_suspend();
......
......@@ -115,8 +115,6 @@ bool usbmoded_get_connection_state (void);
void usbmoded_set_usb_connected_state (void);
void usbmoded_set_usb_connected (bool connected);
void usbmoded_set_charger_connected (bool state);
const char *usbmoded_get_android_bootup_function (void);
void usbmoded_set_android_bootup_function (const char *function);
int usbmoded_valid_mode (const char *mode);
gchar *usbmoded_get_mode_list (mode_list_type_t type);
const char *usbmoded_get_usb_module (void);
......
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