---
name: "usb_gadget_unregister_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_gadget_unregister_driver"
---

# usb\_gadget\_unregister\_driver(9)

unregister a gadget driver

## NAME

usb\_gadget\_unregister\_driver - unregister a gadget driver

## SYNOPSIS

**int usb\_gadget\_unregister\_driver(struct usb\_gadget\_driver \*** *driver***);**

## ARGUMENTS

*driver*

the driver being unregistered

## CONTEXT

can sleep

## DESCRIPTION

Call this in your gadget driver's module cleanup function, to tell the underlying usb controller that your driver is going away. If the controller is connected to a USB host, it will first **disconnect**. The driver is also requested to **unbind** and clean up any device state, before this procedure finally returns. It's expected that the **unbind** functions will in in exit sections, so may not be linked in some kernels.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
