summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-12-07 10:39:48 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-07 11:25:26 +0100
commit9afabf549f3b1f3b5566b805ad97c5216dace014 (patch)
treebdc1d8d1ac07dbecb7ab42006e20b8b7d0739af2 /drivers/usb
parentb2f3f9c1023e675de845cd2641947429a6e8905f (diff)
downloadbarebox-9afabf549f3b1f3b5566b805ad97c5216dace014.tar.gz
barebox-9afabf549f3b1f3b5566b805ad97c5216dace014.tar.xz
usb: gadget: fastboot: simplify reboot
Now that we end the fastboot session when shutting down barebox we can call restart_machine() directly and not in the completion callback of the answer request. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_fastboot.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index f6eb30dec4..067b43ebed 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -622,15 +622,9 @@ int fastboot_tx_print(struct f_fastboot *f_fb, enum fastboot_msg_type type,
return fastboot_tx_write(f_fb, buf, n);
}
-static void compl_do_reset(struct usb_ep *ep, struct usb_request *req)
-{
- restart_machine();
-}
-
static void cb_reboot(struct f_fastboot *f_fb, const char *cmd)
{
- f_fb->in_req->complete = compl_do_reset;
- fastboot_tx_print(f_fb, FASTBOOT_MSG_OKAY, "");
+ restart_machine();
}
static int strcmp_l1(const char *s1, const char *s2)