/* After @udev's port has been disabled, khubd is notified and it will see that the device has been disconnected. When the device is physically unplugged and something is plugged in, the events will be received and processed normally.  */
int usb_remove_device(struct usb_device *udev)
/* After @udev's port has been disabled, khubd is notified and it will see that the device has been disconnected. When the device is physically unplugged and something is plugged in, the events will be received and processed normally.  */
int usb_remove_device(struct usb_device *udev)
{
	struct usb_hub *hub;
	struct usb_interface *intf;
	if (!udev->parent)
		return -EINVAL;
	hub = hdev_to_hub(udev->parent);
	intf = to_usb_interface(hub->intfdev);
	usb_autopm_get_interface(intf);
	set_bit(udev->portnum, hub->removed_bits);
	hub_port_logical_disconnect(hub, udev->portnum);
	usb_autopm_put_interface(intf);
	return 0;
}