Skip to content
Commit 903b39e1 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

usb: ohci-omap: avoid unused-variable warning



The dead code removal has led to 'need_transceiver' not being
used at all when OTG support is disabled:

drivers/usb/host/ohci-omap.c: In function 'ohci_omap_reset':
drivers/usb/host/ohci-omap.c:99:33: error: unused variable 'need_transceiver' [-Werror=unused-variable]
   99 |         int                     need_transceiver = (config->otg != 0);

Change the #ifdef check into an IS_ENABLED() check to make the
code more readable and let the compiler see where it is used.

Fixes: 8825acd7 ("ARM: omap1: remove dead code")
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent ae4cc020
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment