---
name: "usb_get_dev"
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_get_dev"
---

# usb\_get\_dev(9)

increments the reference count of the usb device structure

## NAME

usb\_get\_dev - increments the reference count of the usb device structure

## SYNOPSIS

**struct usb\_device \* usb\_get\_dev(struct usb\_device \*** *dev***);**

## ARGUMENTS

*dev*

the device being referenced

## DESCRIPTION

Each live reference to a device should be refcounted.

Drivers for USB interfaces should normally record such references in their **probe** methods, when they bind to an interface, and release them by calling **usb\_put\_dev**, in their **disconnect** methods.

## RETURN

A pointer to the device with the incremented reference counter.

## COPYRIGHT
