---
name: "usb_driver_claim_interface"
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_claim_interface"
---

# usb\_driver\_claim\_interface(9)

bind a driver to an interface

## NAME

usb\_driver\_claim\_interface - bind a driver to an interface

## SYNOPSIS

**int usb\_driver\_claim\_interface(struct usb\_driver \*** *driver***, struct usb\_interface \*** *iface***, void \*** *priv***);**

## ARGUMENTS

*driver*

the driver to be bound

*iface*

the interface to which it will be bound; must be in the usb device's active configuration

*priv*

driver data associated with that interface

## DESCRIPTION

This is used by usb device drivers that need to claim more than one interface on a device when probing (audio and acm are current examples). No device driver should directly modify internal usb\_interface or usb\_device structure members.

Few drivers should need to use this routine, since the most natural way to bind to an interface is to return the private data from the driver's **probe** method.

Callers must own the device lock, so driver **probe** entries don't need extra locking, but other call contexts may need to explicitly claim that lock.

## RETURN

0 on success.

## COPYRIGHT
