---
name: "usb_register_driver"
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_register_driver"
---

# usb\_register\_driver(9)

register a USB interface driver

## NAME

usb\_register\_driver - register a USB interface driver

## SYNOPSIS

**int usb\_register\_driver(struct usb\_driver \*** *new\_driver***, struct module \*** *owner***, const char \*** *mod\_name***);**

## ARGUMENTS

*new\_driver*

USB operations for the interface driver

*owner*

module owner of this driver.

*mod\_name*

module name string

## DESCRIPTION

Registers a USB interface driver with the USB core. The list of unattached interfaces will be rescanned whenever a new driver is added, allowing the new driver to attach to any recognized interfaces.

## RETURN

A negative error code on failure and 0 on success.

## NOTE

if you want your driver to use the USB major number, you must call **usb\_register\_dev** to enable that functionality. This function no longer takes care of that.

## COPYRIGHT
