]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: OMAP: OTG integration: fix compiler warning
authorPaul Walmsley <paul@pwsan.com>
Wed, 9 May 2012 22:38:02 +0000 (16:38 -0600)
committerTony Lindgren <tony@atomide.com>
Fri, 11 May 2012 16:56:43 +0000 (09:56 -0700)
commit19b08b33fa4c60d66d4e341d4d1d9a6e86ffc9e6
tree287ec18de7afa47de67349dca615fc7cb8741651
parent121e1a73a6246df206e779cc163ce95fbd300877
ARM: OMAP: OTG integration: fix compiler warning

Tony reported the following compile warning after commit
eeb3711b89d68e147e05e7b43a49ecc5009dc157 ("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: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/usb.c