From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>,
Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [PATCH 3/9] xhci: dbc: Rename xhci_dbc_init and xhci_dbc_exit
Date: Wed, 16 Feb 2022 11:09:32 +0200 [thread overview]
Message-ID: <20220216090938.1260899-4-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <20220216090938.1260899-1-mathias.nyman@linux.intel.com>
These names give the impressions the functions are related to
module init calls, but are in fact creating and removing the dbc
fake device
Rename them to xhci_creatre_dbc_dev() and xhci_remove_dbc_dev().
We will need the _init and _exit names for actual dbc module init
calls.
No functional changes
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-dbgcap.c | 5 +++--
drivers/usb/host/xhci-dbgcap.h | 8 ++++----
drivers/usb/host/xhci.c | 4 ++--
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c
index f4da5708a40f..46c8f3c187f7 100644
--- a/drivers/usb/host/xhci-dbgcap.c
+++ b/drivers/usb/host/xhci-dbgcap.c
@@ -1017,7 +1017,8 @@ void xhci_dbc_remove(struct xhci_dbc *dbc)
kfree(dbc);
}
-int xhci_dbc_init(struct xhci_hcd *xhci)
+
+int xhci_create_dbc_dev(struct xhci_hcd *xhci)
{
struct device *dev;
void __iomem *base;
@@ -1041,7 +1042,7 @@ int xhci_dbc_init(struct xhci_hcd *xhci)
return ret;
}
-void xhci_dbc_exit(struct xhci_hcd *xhci)
+void xhci_remove_dbc_dev(struct xhci_hcd *xhci)
{
unsigned long flags;
diff --git a/drivers/usb/host/xhci-dbgcap.h b/drivers/usb/host/xhci-dbgcap.h
index 5d8c7815491c..8b5b363a0719 100644
--- a/drivers/usb/host/xhci-dbgcap.h
+++ b/drivers/usb/host/xhci-dbgcap.h
@@ -194,8 +194,8 @@ static inline struct dbc_ep *get_out_ep(struct xhci_dbc *dbc)
}
#ifdef CONFIG_USB_XHCI_DBGCAP
-int xhci_dbc_init(struct xhci_hcd *xhci);
-void xhci_dbc_exit(struct xhci_hcd *xhci);
+int xhci_create_dbc_dev(struct xhci_hcd *xhci);
+void xhci_remove_dbc_dev(struct xhci_hcd *xhci);
int xhci_dbc_tty_probe(struct device *dev, void __iomem *res, struct xhci_hcd *xhci);
void xhci_dbc_tty_remove(struct xhci_dbc *dbc);
struct xhci_dbc *xhci_alloc_dbc(struct device *dev, void __iomem *res,
@@ -211,12 +211,12 @@ int xhci_dbc_suspend(struct xhci_hcd *xhci);
int xhci_dbc_resume(struct xhci_hcd *xhci);
#endif /* CONFIG_PM */
#else
-static inline int xhci_dbc_init(struct xhci_hcd *xhci)
+static inline int xhci_create_dbc_dev(struct xhci_hcd *xhci)
{
return 0;
}
-static inline void xhci_dbc_exit(struct xhci_hcd *xhci)
+static inline void xhci_remove_dbc_dev(struct xhci_hcd *xhci)
{
}
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index dc357cabb265..ab1b5ff3fc99 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -695,7 +695,7 @@ int xhci_run(struct usb_hcd *hcd)
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Finished xhci_run for USB2 roothub");
- xhci_dbc_init(xhci);
+ xhci_create_dbc_dev(xhci);
xhci_debugfs_init(xhci);
@@ -725,7 +725,7 @@ static void xhci_stop(struct usb_hcd *hcd)
return;
}
- xhci_dbc_exit(xhci);
+ xhci_remove_dbc_dev(xhci);
spin_lock_irq(&xhci->lock);
xhci->xhc_state |= XHCI_STATE_HALTED;
--
2.25.1
next prev parent reply other threads:[~2022-02-16 9:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 9:09 [PATCH 0/9] xhci and hub features for usb-next Mathias Nyman
2022-02-16 9:09 ` [PATCH 1/9] xhci: dbc: refactor xhci_dbc_init() Mathias Nyman
2022-02-16 9:09 ` [PATCH 2/9] xhci: dbc: create and remove dbc structure in dbgtty driver Mathias Nyman
2022-02-16 9:09 ` Mathias Nyman [this message]
2022-02-16 9:09 ` [PATCH 4/9] xhci: dbc: Don't call dbc_tty_init() on every dbc tty probe Mathias Nyman
2022-02-16 9:09 ` [PATCH 5/9] xhci: dbgtty: use IDR to support several dbc instances Mathias Nyman
2022-02-16 9:09 ` [PATCH 6/9] xhci: Allocate separate command structures for each LPM command Mathias Nyman
2022-02-16 9:09 ` [PATCH 7/9] usb: remove Link Powermanagement (LPM) disable before port reset Mathias Nyman
2022-02-16 9:09 ` [PATCH 8/9] usb: host: xhci: drop redundant checks Mathias Nyman
2022-02-16 9:09 ` [PATCH 9/9] usb: xhci: fix minmax.cocci warnings Mathias Nyman
2022-02-16 9:21 ` [PATCH 0/9] xhci and hub features for usb-next Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220216090938.1260899-4-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox