From aa70297ede53c7291b8afc161593247eb6b85f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 24 Nov 2005 13:22:13 +0000 Subject: [PATCH] Sort entries in usbport.def Define some functions only if DEBUG_MODE is defined svn path=/trunk/; revision=19524 --- .../usb/miniport/linux/linux_wrapper.h | 2 +- .../drivers/usb/miniport/usbohci/ohci-hcd.c | 2 + reactos/drivers/usb/usbhub/fdo.c | 2 +- reactos/drivers/usb/usbport/hcd.c | 2 + reactos/drivers/usb/usbport/usbport.def | 44 +++++++++---------- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/reactos/drivers/usb/miniport/linux/linux_wrapper.h b/reactos/drivers/usb/miniport/linux/linux_wrapper.h index 3c1bf71b5ce..aa5ff204fd5 100644 --- a/reactos/drivers/usb/miniport/linux/linux_wrapper.h +++ b/reactos/drivers/usb/miniport/linux/linux_wrapper.h @@ -656,7 +656,7 @@ void my_kmem_cache_free(kmem_cache_t *co, void *ptr); #define dev_warn(x,f,arg...) do {} while (0) #define dev_err(x,f,arg...) do {} while (0) #define pr_debug(x,f,arg...) do {} while (0) -#define usbprintk +#define usbprintk(arg...) dev_printk(0,0,0,## arg) #endif diff --git a/reactos/drivers/usb/miniport/usbohci/ohci-hcd.c b/reactos/drivers/usb/miniport/usbohci/ohci-hcd.c index 840c275c862..285d163b31f 100644 --- a/reactos/drivers/usb/miniport/usbohci/ohci-hcd.c +++ b/reactos/drivers/usb/miniport/usbohci/ohci-hcd.c @@ -625,6 +625,7 @@ int ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs) /*-------------------------------------------------------------------------*/ +#ifdef DEBUG_MODE // HCFS itself static char *hcfs2string (int state) { @@ -636,6 +637,7 @@ static char *hcfs2string (int state) } return "?"; } +#endif static void ohci_stop (struct usb_hcd *hcd) { diff --git a/reactos/drivers/usb/usbhub/fdo.c b/reactos/drivers/usb/usbhub/fdo.c index 8d29846aade..786bba498a1 100644 --- a/reactos/drivers/usb/usbhub/fdo.c +++ b/reactos/drivers/usb/usbhub/fdo.c @@ -103,7 +103,7 @@ UsbhubFdoQueryBusRelations( PdoExtension->IsFDO = FALSE; PdoExtension->dev = dev->children[i]; - sprintf(Buffer[0], "%lu", i + 1); + sprintf(Buffer[0], "%lu", i); Status = UsbhubInitMultiSzString( &PdoExtension->InstanceId, Buffer[0], NULL); diff --git a/reactos/drivers/usb/usbport/hcd.c b/reactos/drivers/usb/usbport/hcd.c index 4a5c731b836..a0697185447 100644 --- a/reactos/drivers/usb/usbport/hcd.c +++ b/reactos/drivers/usb/usbport/hcd.c @@ -822,6 +822,7 @@ int STDCALL usb_check_bandwidth (struct usb_device *dev, struct urb *urb) new_alloc = old_alloc + (int) bustime; if (new_alloc > FRAME_TIME_MAX_USECS_ALLOC) { +#ifdef DEBUG_MODE #ifdef DEBUG char *mode = #ifdef CONFIG_USB_BANDWIDTH @@ -832,6 +833,7 @@ int STDCALL usb_check_bandwidth (struct usb_device *dev, struct urb *urb) dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n", mode, old_alloc, bustime, new_alloc); #endif +#endif #ifdef CONFIG_USB_BANDWIDTH bustime = -ENOSPC; /* report error */ #endif diff --git a/reactos/drivers/usb/usbport/usbport.def b/reactos/drivers/usb/usbport/usbport.def index c1ca326fef5..a784bc9ee89 100644 --- a/reactos/drivers/usb/usbport/usbport.def +++ b/reactos/drivers/usb/usbport/usbport.def @@ -2,33 +2,33 @@ ; Exports definition file for usbcore.sys ; EXPORTS -usb_init@0 -usb_exit@0 -usb_init_urb@4 -usb_alloc_urb@8 -usb_free_urb@4 -usb_get_string -usb_get_urb@4 -usb_get_dev@4 -usb_submit_urb@8 -usb_unlink_urb@4 -usb_bus_init@4 +RegisterPortDriver@8 usb_alloc_bus@4 -usb_free_bus@4 -usb_register_bus@4 -usb_deregister_bus@4 -usb_register_root_hub@8 +usb_alloc_dev@8 +usb_alloc_urb@8 +usb_bus_init@4 usb_calc_bus_time@16 usb_check_bandwidth@8 usb_claim_bandwidth@16 -usb_release_bandwidth@12 +usb_connect@4 +usb_deregister_bus@4 +usb_disabled@0 +usb_exit@0 +usb_free_bus@4 +usb_free_urb@4 +usb_get_dev@4 +usb_get_string +usb_get_urb@4 usb_hcd_giveback_urb@12 ;usb_hcd_irq@12 -usb_hc_died@4 -usb_alloc_dev@8 -usb_connect@4 -usb_put_dev@4 -usb_disabled@0 usb_hcd_pci_probe@8 usb_hcd_pci_remove@4 -RegisterPortDriver@8 \ No newline at end of file +usb_hc_died@4 +usb_init@0 +usb_init_urb@4 +usb_put_dev@4 +usb_release_bandwidth@12 +usb_register_bus@4 +usb_register_root_hub@8 +usb_submit_urb@8 +usb_unlink_urb@4 \ No newline at end of file