'\" t .\" Title: usb_alloc_dev .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_ALLOC_DEV" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "USB Core APIs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_alloc_dev \- usb device constructor (usbcore\-internal) .SH "SYNOPSIS" .HP \w'struct\ usb_device\ *\ usb_alloc_dev('u .BI "struct usb_device * usb_alloc_dev(struct\ usb_device\ *\ " "parent" ", struct\ usb_bus\ *\ " "bus" ", unsigned\ " "port1" ");" .SH "ARGUMENTS" .PP \fIparent\fR .RS 4 hub to which device is connected; null to allocate a root hub .RE .PP \fIbus\fR .RS 4 bus used to access the device .RE .PP \fIport1\fR .RS 4 one\-based index of port; ignored for root hubs .RE .SH "CONTEXT" .PP !\fBin_interrupt\fR .SH "DESCRIPTION" .PP Only hub drivers (including virtual root hub drivers for host controllers) should ever call this\&. .PP This call may not be used in a non\-sleeping context\&. .SH "RETURN" .PP On success, a pointer to the allocated usb device\&. \fBNULL\fR on failure\&. .SH "COPYRIGHT" .br