Skip to content

Commit 32479d4

Browse files
shimodaygregkh
authored andcommitted
usb: host: xhci: cleanup hcd private size
This patch cleanups the hcd private size to suitable size. The previous code has "sizeof(struct xhci_hcd *)" in xhci_hc_driver as hcd_priv_size and sizeof(struct xhci_hcd) in xhci_plat_overrides or xhci_pci_overrides as extra_priv_size. However, the xhci driver uses a "sizeof(struct xhcd_hcd)" memory space in each hcd (main_hcd and shared_hcd) actually. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5e6389f commit 32479d4

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

drivers/usb/host/xhci-pci.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ static struct hc_driver __read_mostly xhci_pci_hc_driver;
5353
static int xhci_pci_setup(struct usb_hcd *hcd);
5454

5555
static const struct xhci_driver_overrides xhci_pci_overrides __initconst = {
56-
.extra_priv_size = sizeof(struct xhci_hcd),
5756
.reset = xhci_pci_setup,
5857
};
5958

drivers/usb/host/xhci-plat.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ static int xhci_plat_setup(struct usb_hcd *hcd);
3131
static int xhci_plat_start(struct usb_hcd *hcd);
3232

3333
static const struct xhci_driver_overrides xhci_plat_overrides __initconst = {
34-
.extra_priv_size = sizeof(struct xhci_hcd),
3534
.reset = xhci_plat_setup,
3635
.start = xhci_plat_start,
3736
};

drivers/usb/host/xhci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4952,7 +4952,7 @@ EXPORT_SYMBOL_GPL(xhci_gen_setup);
49524952
static const struct hc_driver xhci_hc_driver = {
49534953
.description = "xhci-hcd",
49544954
.product_desc = "xHCI Host Controller",
4955-
.hcd_priv_size = sizeof(struct xhci_hcd *),
4955+
.hcd_priv_size = sizeof(struct xhci_hcd),
49564956

49574957
/*
49584958
* generic hardware linkage

0 commit comments

Comments
 (0)