summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhw/usb_cfs_client_common.c6
-rwxr-xr-xhw/usb_client_common.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/hw/usb_cfs_client_common.c b/hw/usb_cfs_client_common.c
index 3a4246b..7f4de06 100755
--- a/hw/usb_cfs_client_common.c
+++ b/hw/usb_cfs_client_common.c
@@ -650,7 +650,7 @@ static int cfs_prep_ffs_service(const char *name, const char *instance,
if (ret < 0)
return ret;
- ret = systemd_start_unit_sync(socket_name, ".socket", -1);
+ ret = systemd_start_unit_wait_started(socket_name, ".socket", -1);
if (ret < 0)
goto umount_ffs;
@@ -925,8 +925,8 @@ int hw_cfs_gadget_close(struct hw_common *common)
fws = container_of(usb_func,
struct usb_function_with_service,
func);
- systemd_stop_unit_sync(fws->service, ".socket", -1);
- systemd_stop_unit_sync(fws->service, ".service", -1);
+ systemd_stop_unit_wait_stopped(fws->service, ".socket", -1);
+ systemd_stop_unit_wait_stopped(fws->service, ".service", -1);
}
}
diff --git a/hw/usb_client_common.c b/hw/usb_client_common.c
index cf49131..be1e557 100755
--- a/hw/usb_client_common.c
+++ b/hw/usb_client_common.c
@@ -561,7 +561,7 @@ static int legacy_enable(struct usb_client *usb)
fws = container_of(gadget->funcs[i],
struct usb_function_with_service, func);
- ret = systemd_start_unit_sync(fws->service, ".service", -1);
+ ret = systemd_start_unit_wait_started(fws->service, ".service", -1);
if (ret < 0)
goto stop_services;
}
@@ -576,7 +576,7 @@ stop_services:
fws = container_of(gadget->funcs[i],
struct usb_function_with_service, func);
- systemd_stop_unit_sync(fws->service, ".service", -1);
+ systemd_stop_unit_wait_stopped(fws->service, ".service", -1);
}
legacy_free_gadget(gadget);
@@ -601,7 +601,7 @@ static int legacy_disable(struct usb_client *usb)
continue;
fws = container_of(gadget->funcs[i], struct usb_function_with_service, func);
- ret = systemd_stop_unit_sync(fws->service, ".service", -1);
+ ret = systemd_stop_unit_wait_stopped(fws->service, ".service", -1);
if (ret < 0)
goto free_gadget;
}