Author: fireball Date: Fri Aug 21 15:01:27 2009 New Revision: 42824
URL: http://svn.reactos.org/svn/reactos?rev=42824&view=rev Log: - Convert a wrong macro to an inlined function.
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbdr... ============================================================================== --- trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c [iso-8859-1] Fri Aug 21 15:01:27 2009 @@ -72,24 +72,28 @@ * The erratum (#4) description is incorrect. AMD's workaround waits * till some bits (mostly reserved) are clear; ok for all revs. */ -#define read_roothub(hc, register, mask) ({ \ - ULONG temp = OHCI_READ_PORT_ULONG(&((hc)->regs->roothub.register)); \ - if (temp == -1) \ - /*disable (hc)*/; \ - /*else if (hc->flags & OHCI_QUIRK_AMD756) \ - while (temp & mask) \ - temp = ohci_readl (hc, &hc->regs->roothub.register); */ \ - temp; }) +ULONG +FORCEINLINE +read_roothub(POHCI_DEV hc, PULONG reg, ULONG mask) +{ + ULONG temp = OHCI_READ_PORT_ULONG(reg); + if (temp == -1) + /*disable (hc)*/; + /*else if (hc->flags & OHCI_QUIRK_AMD756) + while (temp & mask) + temp = ohci_readl (hc, &hc->regs->roothub.register); */ + return temp; +}
static ULONG roothub_a (POHCI_DEV hc) - { return read_roothub (hc, a, 0xfc0fe000); } + { return read_roothub (hc, &hc->regs->roothub.a, 0xfc0fe000); } /* static inline u32 roothub_b (struct ohci_hcd *hc) { return ohci_readl (hc, &hc->regs->roothub.b); } static inline u32 roothub_status (struct ohci_hcd *hc) { return ohci_readl (hc, &hc->regs->roothub.status); } static u32 roothub_portstatus (struct ohci_hcd *hc, int i) - { return read_roothub (hc, portstatus [i], 0xffe0fce0); } + { return read_roothub (hc, &hc->regs->roothub.portstatus [i], 0xffe0fce0); } */