usb: g_ffs: fix compilation warning
authorDavid Cohen <david.a.cohen@linux.intel.com>
Fri, 4 Oct 2013 22:30:21 +0000 (15:30 -0700)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 15 May 2014 05:26:21 +0000 (07:26 +0200)
commitfc1868d9a042c174a2610c52215217e6c4b72eb8
treeb46e68f8e21eaadee2bd6341559f7081acec53d9
parent8eb98d51766c144ab1fdf2abf231edf4a83e9d4a
usb: g_ffs: fix compilation warning

If USB_FUNCTIONFS is selected without USB_FUNCTIONFS_ETH and
USB_FUNCTIONFS_RNIS, u_ether.h won't be included and then
USB_ETHERNET_MODULE_PARAMAETERS macro won't be available causing the
following warning compilation:

drivers/usb/gadget/g_ffs.c:81:1: warning: data definition has no type or
storage class [enabled by default]
drivers/usb/gadget/g_ffs.c:81:1: warning: type defaults to ‘int’ in
declaration of ‘USB_ETHERNET_MODULE_PARAMETERS’ [-Wimplicit-int]
drivers/usb/gadget/g_ffs.c:81:1: warning: function declaration isn’t a
prototype [-Wstrict-prototypes]

This patch fixes the warning by making USB_ETHERNET_MODULE_PARAMETERS to
be used iff u_ether.h is included, otherwise it is not needed.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/g_ffs.c