---
name: "usb_create_shared_hcd"
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_create_shared_hcd"
---

# usb\_create\_shared\_hcd(9)

create and initialize an HCD structure

## NAME

usb\_create\_shared\_hcd - create and initialize an HCD structure

## SYNOPSIS

**struct usb\_hcd \* usb\_create\_shared\_hcd(const struct hc\_driver \*** *driver***, struct device \*** *dev***, const char \*** *bus\_name***, struct usb\_hcd \*** *primary\_hcd***);**

## ARGUMENTS

*driver*

HC driver that will use this hcd

*dev*

device for this HC, stored in hcd-\>self.controller

*bus\_name*

value to store in hcd-\>self.bus\_name

*primary\_hcd*

a pointer to the usb\_hcd structure that is sharing the PCI device. Only allocate certain resources for the primary HCD

## CONTEXT

!**in\_interrupt**

## DESCRIPTION

Allocate a struct usb\_hcd, with extra space at the end for the HC driver's private data. Initialize the generic members of the hcd structure.

## RETURN

On success, a pointer to the created and initialized HCD structure. On failure (e.g. if memory is unavailable), **NULL**.

## COPYRIGHT
