summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-08 14:38:31 -0700
committerStephen Rothwell <sfr@canb.auug.org.au>2008-08-14 10:12:13 +1000
commitece9ca9ee768bcac8fc4745792de8f185748ae7f (patch)
treebb6ccaf01a65de78a30ef75402dcbcc850c430a6 /drivers
parentac864a1ec8f7af57c6487976dd3fc9c1d29cbf8f (diff)
USB: convert the USB host controller code to use usb_dbg()
It's a plug-in replacement for dev_dbg() and it lets you turn it on or off based on the usbcore debug parameter. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-dbg.c2
-rw-r--r--drivers/usb/host/ehci-fsl.c4
-rw-r--r--drivers/usb/host/ehci-hcd.c1
-rw-r--r--drivers/usb/host/ehci-ixp4xx.c4
-rw-r--r--drivers/usb/host/ehci-orion.c4
-rw-r--r--drivers/usb/host/ehci-ppc-of.c4
-rw-r--r--drivers/usb/host/ehci-ps3.c30
-rw-r--r--drivers/usb/host/ehci-q.c5
-rw-r--r--drivers/usb/host/ehci-sched.c4
-rw-r--r--drivers/usb/host/ohci-at91.c4
-rw-r--r--drivers/usb/host/ohci-omap.c8
-rw-r--r--drivers/usb/host/ohci-pnx4008.c4
-rw-r--r--drivers/usb/host/ohci-ppc-of.c4
-rw-r--r--drivers/usb/host/ohci-ps3.c30
-rw-r--r--drivers/usb/host/ohci-s3c2410.c22
-rw-r--r--drivers/usb/host/uhci-hcd.c9
-rw-r--r--drivers/usb/host/uhci-hub.c2
-rw-r--r--drivers/usb/host/uhci-q.c8
18 files changed, 75 insertions, 74 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index b0f8ed5a7fb9..5bcd48a91b91 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -19,7 +19,7 @@
/* this file is part of ehci-hcd.c */
#define ehci_dbg(ehci, fmt, args...) \
- dev_dbg (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
+ usb_dbg (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
#define ehci_err(ehci, fmt, args...) \
dev_err (ehci_to_hcd(ehci)->self.controller , fmt , ## args )
#define ehci_info(ehci, fmt, args...) \
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 01c3da34f678..0218b197ad06 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -100,14 +100,14 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
hcd->rsrc_len = res->end - res->start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
driver->description)) {
- dev_dbg(&pdev->dev, "controller already in use\n");
+ usb_dbg(&pdev->dev, "controller already in use\n");
retval = -EBUSY;
goto err2;
}
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (hcd->regs == NULL) {
- dev_dbg(&pdev->dev, "error mapping memory\n");
+ usb_dbg(&pdev->dev, "error mapping memory\n");
retval = -EFAULT;
goto err3;
}
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index d9d53f289caf..69ba2381e5c4 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -36,6 +36,7 @@
#include <linux/debugfs.h>
#include "../core/hcd.h"
+#include "../core/usb.h"
#include <asm/byteorder.h>
#include <asm/io.h>
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c
index f9575c409124..177641aac0b3 100644
--- a/drivers/usb/host/ehci-ixp4xx.c
+++ b/drivers/usb/host/ehci-ixp4xx.c
@@ -101,14 +101,14 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev)
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
driver->description)) {
- dev_dbg(&pdev->dev, "controller already in use\n");
+ usb_dbg(&pdev->dev, "controller already in use\n");
retval = -EBUSY;
goto fail_request_resource;
}
hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
if (hcd->regs == NULL) {
- dev_dbg(&pdev->dev, "error mapping memory\n");
+ usb_dbg(&pdev->dev, "error mapping memory\n");
retval = -EFAULT;
goto fail_ioremap;
}
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 5fbdc14e63b3..46f06b04fa14 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -220,14 +220,14 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
if (!request_mem_region(res->start, res->end - res->start + 1,
ehci_orion_hc_driver.description)) {
- dev_dbg(&pdev->dev, "controller already in use\n");
+ usb_dbg(&pdev->dev, "controller already in use\n");
err = -EBUSY;
goto err1;
}
regs = ioremap(res->start, res->end - res->start + 1);
if (regs == NULL) {
- dev_dbg(&pdev->dev, "error mapping memory\n");
+ usb_dbg(&pdev->dev, "error mapping memory\n");
err = -EFAULT;
goto err2;
}
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index b018deed2e8f..8ba4504b5d07 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -115,7 +115,7 @@ ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
if (usb_disabled())
return -ENODEV;
- dev_dbg(&op->dev, "initializing PPC-OF USB Controller\n");
+ usb_dbg(&op->dev, "initializing PPC-OF USB Controller\n");
rv = of_address_to_resource(dn, 0, &res);
if (rv)
@@ -193,7 +193,7 @@ static int ehci_hcd_ppc_of_remove(struct of_device *op)
struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
dev_set_drvdata(&op->dev, NULL);
- dev_dbg(&op->dev, "stopping PPC-OF USB Controller\n");
+ usb_dbg(&op->dev, "stopping PPC-OF USB Controller\n");
usb_remove_hcd(hcd);
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 0eba894bcb01..138f7dfc4258 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -91,7 +91,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
result = ps3_open_hv_device(dev);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_open_hv_device failed\n",
+ usb_dbg(&dev->core, "%s:%d: ps3_open_hv_device failed\n",
__func__, __LINE__);
goto fail_open;
}
@@ -99,7 +99,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
result = ps3_dma_region_create(dev->d_region);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_dma_region_create failed: "
+ usb_dbg(&dev->core, "%s:%d: ps3_dma_region_create failed: "
"(%d)\n", __func__, __LINE__, result);
BUG_ON("check region type");
goto fail_dma_region;
@@ -108,19 +108,19 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
result = ps3_mmio_region_create(dev->m_region);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_map_mmio_region failed\n",
+ usb_dbg(&dev->core, "%s:%d: ps3_map_mmio_region failed\n",
__func__, __LINE__);
result = -EPERM;
goto fail_mmio_region;
}
- dev_dbg(&dev->core, "%s:%d: mmio mapped_addr %lxh\n", __func__,
+ usb_dbg(&dev->core, "%s:%d: mmio mapped_addr %lxh\n", __func__,
__LINE__, dev->m_region->lpar_addr);
result = ps3_io_irq_setup(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_construct_io_irq(%d) failed.\n",
+ usb_dbg(&dev->core, "%s:%d: ps3_construct_io_irq(%d) failed.\n",
__func__, __LINE__, virq);
result = -EPERM;
goto fail_irq;
@@ -131,7 +131,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
hcd = usb_create_hcd(&ps3_ehci_hc_driver, &dev->core, dev_name(&dev->core));
if (!hcd) {
- dev_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__,
+ usb_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__,
__LINE__);
result = -ENOMEM;
goto fail_create_hcd;
@@ -141,25 +141,25 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
hcd->rsrc_len = dev->m_region->len;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name))
- dev_dbg(&dev->core, "%s:%d: request_mem_region failed\n",
+ usb_dbg(&dev->core, "%s:%d: request_mem_region failed\n",
__func__, __LINE__);
hcd->regs = ioremap(dev->m_region->lpar_addr, dev->m_region->len);
if (!hcd->regs) {
- dev_dbg(&dev->core, "%s:%d: ioremap failed\n", __func__,
+ usb_dbg(&dev->core, "%s:%d: ioremap failed\n", __func__,
__LINE__);
result = -EPERM;
goto fail_ioremap;
}
- dev_dbg(&dev->core, "%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__,
(unsigned long)hcd->rsrc_start);
- dev_dbg(&dev->core, "%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__,
(unsigned long)hcd->rsrc_len);
- dev_dbg(&dev->core, "%s:%d: hcd->regs %lxh\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: hcd->regs %lxh\n", __func__, __LINE__,
(unsigned long)hcd->regs);
- dev_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__,
(unsigned long)virq);
ps3_system_bus_set_driver_data(dev, hcd);
@@ -167,7 +167,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
result = usb_add_hcd(hcd, virq, IRQF_DISABLED);
if (result) {
- dev_dbg(&dev->core, "%s:%d: usb_add_hcd failed (%d)\n",
+ usb_dbg(&dev->core, "%s:%d: usb_add_hcd failed (%d)\n",
__func__, __LINE__, result);
goto fail_add_hcd;
}
@@ -200,8 +200,8 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev)
BUG_ON(!hcd);
- dev_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs);
- dev_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq);
+ usb_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs);
+ usb_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq);
tmp = hcd->irq;
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 3712b925b315..e904535e28d5 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -205,13 +205,12 @@ static int qtd_copy_status (
&& (!ehci_is_TDI(ehci)
|| urb->dev->tt->hub !=
ehci_to_hcd(ehci)->self.root_hub)) {
-#ifdef DEBUG
struct usb_device *tt = urb->dev->tt->hub;
- dev_dbg (&tt->dev,
+ usb_dbg (&tt->dev,
"clear tt buffer port %d, a%d ep%d t%08x\n",
urb->dev->ttport, urb->dev->devnum,
usb_pipeendpoint (urb->pipe), token);
-#endif /* DEBUG */
+
/* REVISIT ARC-derived cores don't clear the root
* hub TT buffer in this way...
*/
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index b7853c8bac0f..d583d6b9612b 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -490,7 +490,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
unsigned i;
unsigned period = qh->period;
- dev_dbg (&qh->dev->dev,
+ usb_dbg (&qh->dev->dev,
"link qh%d-%04x/%p start %d [%d/%d us]\n",
period, hc32_to_cpup(ehci, &qh->hw_info2) & (QH_CMASK | QH_SMASK),
qh, qh->start, qh->usecs, qh->c_usecs);
@@ -574,7 +574,7 @@ static void qh_unlink_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
? ((qh->usecs + qh->c_usecs) / qh->period)
: (qh->usecs * 8);
- dev_dbg (&qh->dev->dev,
+ usb_dbg (&qh->dev->dev,
"unlink qh%d-%04x/%p start %d [%d/%d us]\n",
qh->period,
hc32_to_cpup(ehci, &qh->hw_info2) & (QH_CMASK | QH_SMASK),
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 6db7a2889e66..07e853bc8583 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -56,7 +56,7 @@ static void at91_start_hc(struct platform_device *pdev)
struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct ohci_regs __iomem *regs = hcd->regs;
- dev_dbg(&pdev->dev, "start\n");
+ usb_dbg(&pdev->dev, "start\n");
/*
* Start the USB clocks.
@@ -74,7 +74,7 @@ static void at91_stop_hc(struct platform_device *pdev)
struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct ohci_regs __iomem *regs = hcd->regs;
- dev_dbg(&pdev->dev, "stop\n");
+ usb_dbg(&pdev->dev, "stop\n");
/*
* Put the USB host controller into reset.
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 3d532b709670..9e7e94df0fed 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -193,7 +193,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
int need_transceiver = (config->otg != 0);
int ret;
- dev_dbg(hcd->self.controller, "starting USB Controller\n");
+ usb_dbg(hcd->self.controller, "starting USB Controller\n");
if (config->otg) {
ohci_to_hcd(ohci)->self.otg_port = config->otg;
@@ -214,7 +214,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
if (ohci->transceiver) {
int status = otg_set_host(ohci->transceiver,
&ohci_to_hcd(ohci)->self);
- dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n",
+ usb_dbg(hcd->self.controller, "init %s transceiver, status %d\n",
ohci->transceiver->label, status);
if (status) {
if (ohci->transceiver)
@@ -281,7 +281,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
static void ohci_omap_stop(struct usb_hcd *hcd)
{
- dev_dbg(hcd->self.controller, "stopping USB Controller\n");
+ usb_dbg(hcd->self.controller, "stopping USB Controller\n");
omap_ohci_clock_power(0);
}
@@ -339,7 +339,7 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
- dev_dbg(&pdev->dev, "request_mem_region failed\n");
+ usb_dbg(&pdev->dev, "request_mem_region failed\n");
retval = -EBUSY;
goto err1;
}
diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c
index b02cd0761977..ca19049ac4fc 100644
--- a/drivers/usb/host/ohci-pnx4008.c
+++ b/drivers/usb/host/ohci-pnx4008.c
@@ -332,7 +332,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
int ret = 0, irq;
- dev_dbg(&pdev->dev, "%s: " DRIVER_INFO " (pnx4008)\n", hcd_name);
+ usb_dbg(&pdev->dev, "%s: " DRIVER_INFO " (pnx4008)\n", hcd_name);
if (usb_disabled()) {
err("USB is disabled");
ret = -ENODEV;
@@ -399,7 +399,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
hcd->rsrc_start = pdev->resource[0].start;
hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
- dev_dbg(&pdev->dev, "request_mem_region failed\n");
+ usb_dbg(&pdev->dev, "request_mem_region failed\n");
ret = -ENOMEM;
goto out4;
}
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 91e6e101a4cc..a1170e402762 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -100,7 +100,7 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
of_device_is_compatible(dn, "ohci-bigendian") ||
of_device_is_compatible(dn, "ohci-be");
- dev_dbg(&op->dev, "initializing PPC-OF USB Controller\n");
+ usb_dbg(&op->dev, "initializing PPC-OF USB Controller\n");
rv = of_address_to_resource(dn, 0, &res);
if (rv)
@@ -164,7 +164,7 @@ static int ohci_hcd_ppc_of_remove(struct of_device *op)
struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
dev_set_drvdata(&op->dev, NULL);
- dev_dbg(&op->dev, "stopping PPC-OF USB Controller\n");
+ usb_dbg(&op->dev, "stopping PPC-OF USB Controller\n");
usb_remove_hcd(hcd);
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index 55c95647f008..c5dad5874333 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -91,7 +91,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
result = ps3_open_hv_device(dev);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_open_hv_device failed: %s\n",
+ usb_dbg(&dev->core, "%s:%d: ps3_open_hv_device failed: %s\n",
__func__, __LINE__, ps3_result(result));
result = -EPERM;
goto fail_open;
@@ -100,7 +100,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
result = ps3_dma_region_create(dev->d_region);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_dma_region_create failed: "
+ usb_dbg(&dev->core, "%s:%d: ps3_dma_region_create failed: "
"(%d)\n", __func__, __LINE__, result);
BUG_ON("check region type");
goto fail_dma_region;
@@ -109,19 +109,19 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
result = ps3_mmio_region_create(dev->m_region);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_map_mmio_region failed\n",
+ usb_dbg(&dev->core, "%s:%d: ps3_map_mmio_region failed\n",
__func__, __LINE__);
result = -EPERM;
goto fail_mmio_region;
}
- dev_dbg(&dev->core, "%s:%d: mmio mapped_addr %lxh\n", __func__,
+ usb_dbg(&dev->core, "%s:%d: mmio mapped_addr %lxh\n", __func__,
__LINE__, dev->m_region->lpar_addr);
result = ps3_io_irq_setup(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq);
if (result) {
- dev_dbg(&dev->core, "%s:%d: ps3_construct_io_irq(%d) failed.\n",
+ usb_dbg(&dev->core, "%s:%d: ps3_construct_io_irq(%d) failed.\n",
__func__, __LINE__, virq);
result = -EPERM;
goto fail_irq;
@@ -132,7 +132,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
hcd = usb_create_hcd(&ps3_ohci_hc_driver, &dev->core, dev_name(&dev->core));
if (!hcd) {
- dev_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__,
+ usb_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__,
__LINE__);
result = -ENOMEM;
goto fail_create_hcd;
@@ -142,25 +142,25 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
hcd->rsrc_len = dev->m_region->len;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name))
- dev_dbg(&dev->core, "%s:%d: request_mem_region failed\n",
+ usb_dbg(&dev->core, "%s:%d: request_mem_region failed\n",
__func__, __LINE__);
hcd->regs = ioremap(dev->m_region->lpar_addr, dev->m_region->len);
if (!hcd->regs) {
- dev_dbg(&dev->core, "%s:%d: ioremap failed\n", __func__,
+ usb_dbg(&dev->core, "%s:%d: ioremap failed\n", __func__,
__LINE__);
result = -EPERM;
goto fail_ioremap;
}
- dev_dbg(&dev->core, "%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__,
(unsigned long)hcd->rsrc_start);
- dev_dbg(&dev->core, "%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__,
(unsigned long)hcd->rsrc_len);
- dev_dbg(&dev->core, "%s:%d: hcd->regs %lxh\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: hcd->regs %lxh\n", __func__, __LINE__,
(unsigned long)hcd->regs);
- dev_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__,
+ usb_dbg(&dev->core, "%s:%d: virq %lu\n", __func__, __LINE__,
(unsigned long)virq);
ps3_system_bus_set_driver_data(dev, hcd);
@@ -168,7 +168,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
result = usb_add_hcd(hcd, virq, IRQF_DISABLED);
if (result) {
- dev_dbg(&dev->core, "%s:%d: usb_add_hcd failed (%d)\n",
+ usb_dbg(&dev->core, "%s:%d: usb_add_hcd failed (%d)\n",
__func__, __LINE__, result);
goto fail_add_hcd;
}
@@ -201,8 +201,8 @@ static int ps3_ohci_remove (struct ps3_system_bus_device *dev)
BUG_ON(!hcd);
- dev_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs);
- dev_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq);
+ usb_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs);
+ usb_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq);
tmp = hcd->irq;
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 9e3dc4069e8b..befdf68b83bd 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -47,7 +47,7 @@ static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
{
struct s3c2410_hcd_info *info = dev->dev.platform_data;
- dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
+ usb_dbg(&dev->dev, "s3c2410_start_hc:\n");
clk_enable(usb_clk);
mdelay(2); /* let the bus clock stabilise */
@@ -68,7 +68,7 @@ static void s3c2410_stop_hc(struct platform_device *dev)
{
struct s3c2410_hcd_info *info = dev->dev.platform_data;
- dev_dbg(&dev->dev, "s3c2410_stop_hc:\n");
+ usb_dbg(&dev->dev, "s3c2410_stop_hc:\n");
if (info != NULL) {
info->report_oc = NULL;
@@ -109,7 +109,7 @@ ohci_s3c2410_hub_status_data (struct usb_hcd *hcd, char *buf)
for (portno = 0; portno < 2; port++, portno++) {
if (port->oc_changed == 1 &&
port->flags & S3C_HCDFLG_USED) {
- dev_dbg(hcd->self.controller,
+ usb_dbg(hcd->self.controller,
"oc change on port %d\n", portno);
if (orig < 1)
@@ -160,7 +160,7 @@ static int ohci_s3c2410_hub_control (
int ret = -EINVAL;
u32 *data = (u32 *)buf;
- dev_dbg(hcd->self.controller,
+ usb_dbg(hcd->self.controller,
"s3c2410_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n",
hcd, typeReq, wValue, wIndex, buf, wLength);
@@ -178,7 +178,7 @@ static int ohci_s3c2410_hub_control (
switch (typeReq) {
case SetPortFeature:
if (wValue == USB_PORT_FEAT_POWER) {
- dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n");
+ usb_dbg(hcd->self.controller, "SetPortFeat: POWER\n");
s3c2410_usb_set_power(info, wIndex, 1);
goto out;
}
@@ -187,7 +187,7 @@ static int ohci_s3c2410_hub_control (
case ClearPortFeature:
switch (wValue) {
case USB_PORT_FEAT_C_OVER_CURRENT:
- dev_dbg(hcd->self.controller,
+ usb_dbg(hcd->self.controller,
"ClearPortFeature: C_OVER_CURRENT\n");
if (valid_port(wIndex)) {
@@ -198,7 +198,7 @@ static int ohci_s3c2410_hub_control (
goto out;
case USB_PORT_FEAT_OVER_CURRENT:
- dev_dbg(hcd->self.controller,
+ usb_dbg(hcd->self.controller,
"ClearPortFeature: OVER_CURRENT\n");
if (valid_port(wIndex)) {
@@ -208,7 +208,7 @@ static int ohci_s3c2410_hub_control (
goto out;
case USB_PORT_FEAT_POWER:
- dev_dbg(hcd->self.controller,
+ usb_dbg(hcd->self.controller,
"ClearPortFeature: POWER\n");
if (valid_port(wIndex)) {
@@ -233,7 +233,7 @@ static int ohci_s3c2410_hub_control (
if (info->power_control == NULL)
return ret;
- dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n",
+ usb_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n",
desc->wHubCharacteristics);
/* remove the old configurations for power-switching, and
@@ -248,7 +248,7 @@ static int ohci_s3c2410_hub_control (
desc->wHubCharacteristics |= cpu_to_le16(0x0008|0x0001);
}
- dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
+ usb_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
desc->wHubCharacteristics);
return ret;
@@ -256,7 +256,7 @@ static int ohci_s3c2410_hub_control (
case GetPortStatus:
/* check port status */
- dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
+ usb_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
if (valid_port(wIndex)) {
if (info->port[wIndex-1].oc_changed) {
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 3a7bfe7a8874..fbc8ed437c21 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -47,6 +47,7 @@
#include <asm/system.h>
#include "../core/hcd.h"
+#include "../core/usb.h"
#include "uhci-hcd.h"
#include "pci-quirks.h"
@@ -265,7 +266,7 @@ __acquires(uhci->lock)
struct usb_device *rhdev = uhci_to_hcd(uhci)->self.root_hub;
auto_stop = (new_state == UHCI_RH_AUTO_STOPPED);
- dev_dbg(&rhdev->dev, "%s%s\n", __func__,
+ usb_dbg(&rhdev->dev, "%s%s\n", __func__,
(auto_stop ? " (auto-stop)" : ""));
/* Start off by assuming Resume-Detect interrupts and EGSM work
@@ -371,7 +372,7 @@ static void wakeup_rh(struct uhci_hcd *uhci)
__releases(uhci->lock)
__acquires(uhci->lock)
{
- dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
+ usb_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
"%s%s\n", __func__,
uhci->rh_state == UHCI_RH_AUTO_STOPPED ?
" (auto-start)" : "");
@@ -775,7 +776,7 @@ static int uhci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
int rc = 0;
- dev_dbg(uhci_dev(uhci), "%s\n", __func__);
+ usb_dbg(uhci_dev(uhci), "%s\n", __func__);
spin_lock_irq(&uhci->lock);
if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
@@ -811,7 +812,7 @@ static int uhci_pci_resume(struct usb_hcd *hcd)
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
- dev_dbg(uhci_dev(uhci), "%s\n", __func__);
+ usb_dbg(uhci_dev(uhci), "%s\n", __func__);
/* Since we aren't in D3 any more, it's safe to set this flag
* even if the controller was dead.
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
index 885b585360b9..dbb1639ffd66 100644
--- a/drivers/usb/host/uhci-hub.c
+++ b/drivers/usb/host/uhci-hub.c
@@ -303,7 +303,7 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
wPortStatus |= USB_PORT_STAT_LOW_SPEED;
if (wPortChange)
- dev_dbg(uhci_dev(uhci), "port %d portsc %04x,%02x\n",
+ usb_dbg(uhci_dev(uhci), "port %d portsc %04x,%02x\n",
wIndex, status, lstatus);
*(__le16 *)buf = cpu_to_le16(wPortStatus);
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index db645936eedd..fbd42253fa08 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -649,7 +649,7 @@ static int uhci_check_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh)
/* Maximum allowable periodic bandwidth is 90%, or 900 us per frame */
if (minimax_load + qh->load > 900) {
- dev_dbg(uhci_dev(uhci), "bandwidth allocation failed: "
+ usb_dbg(uhci_dev(uhci), "bandwidth allocation failed: "
"period %d, phase %d, %d + %d us\n",
qh->period, qh->phase, minimax_load, qh->load);
return -ENOSPC;
@@ -683,7 +683,7 @@ static void uhci_reserve_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh)
break;
}
qh->bandwidth_reserved = 1;
- dev_dbg(uhci_dev(uhci),
+ usb_dbg(uhci_dev(uhci),
"%s dev %d ep%02x-%s, period %d, phase %d, %d us\n",
"reserve", qh->udev->devnum,
qh->hep->desc.bEndpointAddress, p,
@@ -716,7 +716,7 @@ static void uhci_release_bandwidth(struct uhci_hcd *uhci, struct uhci_qh *qh)
break;
}
qh->bandwidth_reserved = 0;
- dev_dbg(uhci_dev(uhci),
+ usb_dbg(uhci_dev(uhci),
"%s dev %d ep%02x-%s, period %d, phase %d, %d us\n",
"release", qh->udev->devnum,
qh->hep->desc.bEndpointAddress, p,
@@ -1169,7 +1169,7 @@ static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb)
uhci_packetout(td_token(td)));
if ((debug == 1 && ret != -EPIPE) || debug > 1) {
/* Some debugging code */
- dev_dbg(&urb->dev->dev,
+ usb_dbg(&urb->dev->dev,
"%s: failed with status %x\n",
__func__, status);