From ad9774c22b8cedbe404f5bcd2dcaaf3052843aa1 Mon Sep 17 00:00:00 2001 From: wlf Date: Wed, 17 Sep 2014 19:23:52 +0800 Subject: [PATCH] USB: fix compilation warning --- drivers/usb/dwc_otg_310/dwc_otg_hcd.c | 3 +-- drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c | 3 +-- drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd.c index 13f76b4664c9..20aaba08ff30 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd.c @@ -443,11 +443,10 @@ static int dwc_otg_hcd_sleep_cb(void *p) * * @param p void pointer to the struct usb_hcd */ -extern inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd); static int dwc_otg_hcd_rem_wakeup_cb(void *p) { dwc_otg_hcd_t *dwc_otg_hcd = p; - struct usb_hcd *hcd = dwc_otg_hcd_to_hcd(dwc_otg_hcd); + struct usb_hcd *hcd = dwc_otg_hcd_get_priv_data(dwc_otg_hcd); if (dwc_otg_hcd->core_if->lx_state == DWC_OTG_L2) { dwc_otg_hcd->flags.b.port_suspend_change = 1; diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c index 9065863c3048..c803e39a22d6 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c @@ -308,7 +308,6 @@ int32_t dwc_otg_hcd_handle_perio_tx_fifo_empty_intr(dwc_otg_hcd_t *dwc_otg_hcd) return 1; } -extern inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd); /** There are multiple conditions that can cause a port interrupt. This function * determines which interrupt conditions have occurred and handles them * appropriately. */ @@ -317,7 +316,7 @@ int32_t dwc_otg_hcd_handle_port_intr(dwc_otg_hcd_t *dwc_otg_hcd) int retval = 0; hprt0_data_t hprt0; hprt0_data_t hprt0_modify; - struct usb_hcd *hcd = dwc_otg_hcd_to_hcd(dwc_otg_hcd); + struct usb_hcd *hcd = dwc_otg_hcd_get_priv_data(dwc_otg_hcd); struct usb_bus *bus = hcd_to_bus(hcd); hprt0.d32 = DWC_READ_REG32(dwc_otg_hcd->core_if->host_if->hprt0); diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c index 046d1ee8270f..0f6eb8a95c99 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c @@ -146,13 +146,11 @@ static inline dwc_otg_hcd_t *hcd_to_dwc_otg_hcd(struct usb_hcd *hcd) } /** Gets the struct usb_hcd that contains a dwc_otg_hcd_t. */ -inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd) +static inline struct usb_hcd *dwc_otg_hcd_to_hcd(dwc_otg_hcd_t *dwc_otg_hcd) { return dwc_otg_hcd_get_priv_data(dwc_otg_hcd); } -EXPORT_SYMBOL(dwc_otg_hcd_to_hcd); - /** Gets the usb_host_endpoint associated with an URB. */ inline struct usb_host_endpoint *dwc_urb_to_endpoint(struct urb *urb) { -- 2.34.1