• Paul Walmsley's avatar
    ARM: OMAP: OTG integration: fix compiler warning · 19b08b33
    Paul Walmsley authored
    Tony reported the following compile warning after commit
    eeb3711b ("ARM: OMAP2+: clean up some
    cppcheck warnings"):
    
    arch/arm/plat-omap/usb.c: In function 'omap_otg_init':
    arch/arm/plat-omap/usb.c:40: warning: unused variable 'status'
    
    This happens if CONFIG_ARCH_OMAP_OTG is set but
    CONFIG_USB_GADGET_OMAP, CONFIG_USB_OHCI_HCD,
    CONFIG_USB_OHCI_HCD_MODULE, and CONFIG_USB_OTG are all unset.
    
    Fix by localizing the status variable to the blocks that use it.
    
    Compile-tested only, with omap2plus_defconfig and omap2plus_defconfig
    with CONFIG_USB_OHCI_HCD and CONFIG_USB_OTG enabled.
    Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    19b08b33
usb.c 4.11 KB