/* The device has been disconnected. Remove all current transactions and signal the gadget driver that this has happened.  */
static void s3c_hsotg_disconnect(struct s3c_hsotg *hsotg)
/* The device has been disconnected. Remove all current transactions and signal the gadget driver that this has happened.  */
static void s3c_hsotg_disconnect(struct s3c_hsotg *hsotg)
{
	unsigned i;
	if (!hsotg->connected)
		return;
	hsotg->connected = 0;
	for (i = 0; i < hsotg->num_of_eps; i++) {
		if (hsotg->eps_in[i])
			kill_all_requests(hsotg, hsotg->eps_in[i], -ESHUTDOWN);
		if (hsotg->eps_out[i])
			kill_all_requests(hsotg, hsotg->eps_out[i], -ESHUTDOWN);
	}
	call_gadget(hsotg, disconnect);
}