usb: uhci: handle HAS_IOPORT dependencies
authorNiklas Schnelle <schnelle@linux.ibm.com>
Mon, 22 May 2023 10:50:42 +0000 (12:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 May 2023 14:29:03 +0000 (15:29 +0100)
commitdc54ce3e603b0cde997465a4511fae41c0447bab
tree270f459924ec0dedd0ea3041077dc26e42c89069
parentbe3d5a493b666a8faed8c08ece0fce7a9c9cc741
usb: uhci: handle HAS_IOPORT dependencies

In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to guard sections of code calling them
as alternative access methods with CONFIG_HAS_IOPORT checks. For
uhci-hcd there are a lot of I/O port uses that do have MMIO alternatives
all selected by uhci_has_pci_registers() so this can be handled by
UHCI_IN/OUT macros and making uhci_has_pci_registers() constant 0 if
CONFIG_HAS_IOPORT is unset.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20230522105049.1467313-38-schnelle@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/uhci-hcd.c
drivers/usb/host/uhci-hcd.h