'\" t .\" Title: usb_get_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_GET_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_get_dev \- increments the reference count of the usb device structure .SH "SYNOPSIS" .HP \w'struct\ usb_device\ *\ usb_get_dev('u .BI "struct usb_device * usb_get_dev(struct\ usb_device\ *\ " "dev" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 the device being referenced .RE .SH "DESCRIPTION" .PP Each live reference to a device should be refcounted\&. .PP Drivers for USB interfaces should normally record such references in their \fBprobe\fR methods, when they bind to an interface, and release them by calling \fBusb_put_dev\fR, in their \fBdisconnect\fR methods\&. .SH "RETURN" .PP A pointer to the device with the incremented reference counter\&. .SH "COPYRIGHT" .br