Skip to content

Commit

Permalink
[usb-moded] Skip second devicelock check of we go to charging only. F…
Browse files Browse the repository at this point in the history
…ixes: JB#17241

When the device is locked the second devicelock check will not allow to set
the charging mode. This will cause either malfunctions in charging, or
force the charging chip to fall back to dedicated charger mode.
In either case this will fail to bring up the correct mode afterwards.

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Apr 15, 2014
1 parent 901058e commit 833bebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_moded.c
Expand Up @@ -291,7 +291,7 @@ void set_usb_mode(const char *mode)
{
export = usb_moded_get_export_permission();

if(export)
if(export && strcmp(mode, MODE_CHARGING))
{
log_debug("Secondary device lock check failed. Not setting mode!\n");
goto end;
Expand Down

0 comments on commit 833bebf

Please sign in to comment.