'\" t .\" Title: usb_driver_set_configuration .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_DRIVER_SET_CONFI" "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_driver_set_configuration \- Provide a way for drivers to change device configurations .SH "SYNOPSIS" .HP \w'int\ usb_driver_set_configuration('u .BI "int usb_driver_set_configuration(struct\ usb_device\ *\ " "udev" ", int\ " "config" ");" .SH "ARGUMENTS" .PP \fIudev\fR .RS 4 the device whose configuration is being updated .RE .PP \fIconfig\fR .RS 4 the configuration being chosen\&. .RE .SH "CONTEXT" .PP In process context, must be able to sleep .SH "DESCRIPTION" .PP Device interface drivers are not allowed to change device configurations\&. This is because changing configurations will destroy the interface the driver is bound to and create new ones; it would be like a floppy\-disk driver telling the computer to replace the floppy\-disk drive with a tape drive! .PP Still, in certain specialized circumstances the need may arise\&. This routine gets around the normal restrictions by using a work thread to submit the change\-config request\&. .SH "RETURN" .PP 0 if the request was successfully queued, error code otherwise\&. The caller has no way to know whether the queued request will eventually succeed\&. .SH "COPYRIGHT" .br