mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
![Lu Baolu](/assets/img/avatar_default.png)
Each event segment has been exposed through debugfs. There is no need to dump ERST content with printk in code. Remove it to make code more concise and readable. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35 lines
759 B
C
35 lines
759 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* xHCI host controller driver
|
|
*
|
|
* Copyright (C) 2008 Intel Corp.
|
|
*
|
|
* Author: Sarah Sharp
|
|
* Some code borrowed from the Linux EHCI driver.
|
|
*/
|
|
|
|
#include "xhci.h"
|
|
|
|
char *xhci_get_slot_state(struct xhci_hcd *xhci,
|
|
struct xhci_container_ctx *ctx)
|
|
{
|
|
struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx);
|
|
int state = GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state));
|
|
|
|
return xhci_slot_state_string(state);
|
|
}
|
|
|
|
void xhci_dbg_trace(struct xhci_hcd *xhci, void (*trace)(struct va_format *),
|
|
const char *fmt, ...)
|
|
{
|
|
struct va_format vaf;
|
|
va_list args;
|
|
|
|
va_start(args, fmt);
|
|
vaf.fmt = fmt;
|
|
vaf.va = &args;
|
|
xhci_dbg(xhci, "%pV\n", &vaf);
|
|
trace(&vaf);
|
|
va_end(args);
|
|
}
|
|
EXPORT_SYMBOL_GPL(xhci_dbg_trace);
|