/* Allow user programs to claim ports on a hub. When a device is attached to one of these "claimed" ports, the program will "own" the device.  */
static int find_port_owner(struct usb_device *hdev, unsigned port1, void ***ppowner)
/* Allow user programs to claim ports on a hub. When a device is attached to one of these "claimed" ports, the program will "own" the device.  */
static int find_port_owner(struct usb_device *hdev, unsigned port1, void ***ppowner)
{
	if (hdev->state == USB_STATE_NOTATTACHED)
		return -ENODEV;
	if (port1 == 0 || port1 > hdev->maxchild)
		return -EINVAL;
	*ppowner = &(hdev_to_hub(hdev)->port_owners[port1 - 1]);
	return 0;
}