---
name: "usb_autopm_get_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_autopm_get_interface"
---

# usb\_autopm\_get\_interface(9)

increment a USB interface's PM-usage counter

## NAME

usb\_autopm\_get\_interface - increment a USB interface's PM-usage counter

## SYNOPSIS

**int usb\_autopm\_get\_interface(struct usb\_interface \*** *intf***);**

## ARGUMENTS

*intf*

the usb\_interface whose counter should be incremented

## DESCRIPTION

This routine should be called by an interface driver when it wants to use *intf* and needs to guarantee that it is not suspended. In addition, the routine prevents *intf* from being autosuspended subsequently. (Note that this will not prevent suspend events originating in the PM core.) This prevention will persist until **usb\_autopm\_put\_interface** is called or *intf* is unbound. A typical example would be a character-device driver when its device file is opened.

*intf*'s usage counter is incremented to prevent subsequent autosuspends. However if the autoresume fails then the counter is re-decremented.

This routine can run only in process context.

## RETURN

0 on success.

## COPYRIGHT
