---
name: "usb_driver_set_configuration"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_driver_set_configuration"
---

# usb\_driver\_set\_configuration(9)

Provide a way for drivers to change device configurations

## NAME

usb\_driver\_set\_configuration - Provide a way for drivers to change device configurations

## SYNOPSIS

**int usb\_driver\_set\_configuration(struct usb\_device \*** *udev***, int** *config***);**

## ARGUMENTS

*udev*

the device whose configuration is being updated

*config*

the configuration being chosen.

## CONTEXT

In process context, must be able to sleep

## DESCRIPTION

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!

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.

## RETURN

0 if the request was successfully queued, error code otherwise. The caller has no way to know whether the queued request will eventually succeed.

## COPYRIGHT
