[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1652926622-85047-1-git-send-email-quic_wat@quicinc.com>
Date: Thu, 19 May 2022 10:17:01 +0800
From: Tao Wang <quic_wat@...cinc.com>
To: Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org (open list:USB XHCI DRIVER),
linux-kernel@...r.kernel.org (open list)
Cc: quic_wat@...cinc.com
Subject: [PATCH] usb: xhci: save hcd_priv memory of shared_hcd
The shared_hcd->hcd_priv is not used in xhci, so not
need to malloc hcd priv memory for shared_hcd.
Signed-off-by: Tao Wang <quic_wat@...cinc.com>
---
drivers/usb/host/xhci-plat.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 01dcfd7..a27dd3a 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -336,6 +336,11 @@ static int xhci_plat_probe(struct platform_device *pdev)
device_set_wakeup_capable(&pdev->dev, true);
xhci->main_hcd = hcd;
+ /*
+ * The shared_hcd->hcd_priv is not used in xhci,
+ * so not need to malloc hcd priv memory for shared_hcd.
+ */
+ driver->hcd_priv_size = 0;
xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,
dev_name(&pdev->dev), hcd);
if (!xhci->shared_hcd) {
--
2.7.4
Powered by blists - more mailing lists