usb_alloc_dev(9)

usb_alloc_dev9

Usb device constructor (usbcore-internal)

Usage

struct usb_device * usb_alloc_dev(struct usb_device * parent, struct usb_bus * bus, unsigned port1);

Arguments

parent

hub to which device is connected; null to allocate a root hub

bus

bus used to access the device

port1

one-based index of port; ignored for root hubs

Context

!in_interrupt

Overview

Only hub drivers (including virtual root hub drivers for host controllers) should ever call this.

This call may not be used in a non-sleeping context.

Return

On success, a pointer to the allocated usb device. NULL on failure.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.