summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2017-01-17 08:51:22 +0530
committerMarek Vasut <marek.vasut@gmail.com>2017-01-17 10:26:46 +0100
commit65c389d27902f6376bd057609b66b7339b219cf1 (patch)
treea0f9a1f14a31a81193a49455fcdc28b9bc146e7b /drivers/usb
parent1f1745c65a98846b691e30013c43dc36fec9b813 (diff)
drivers: usb: gadget: ether: Fix compiler warning
Latest gcc 6.2 compiler is throwing the below warning for am335x_baltos_defconfig drivers/usb/gadget/ether.c:501:17: warning: 'mdlm_detail_desc' defined but not used [-Wunused-const-variable=] static const u8 mdlm_detail_desc[] = { Guard mdlm_detail_desc with CONFIG_USB_ETH_SUBSET to avoid the warning Reported-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/ether.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index f1b0709821..4137d76c42 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -507,6 +507,7 @@ static const struct usb_cdc_mdlm_desc mdlm_desc = {
* can't really use its struct. All we do here is say that we're using
* the submode of "SAFE" which directly matches the CDC Subset.
*/
+#ifdef CONFIG_USB_ETH_SUBSET
static const u8 mdlm_detail_desc[] = {
6,
USB_DT_CS_INTERFACE,
@@ -516,6 +517,7 @@ static const u8 mdlm_detail_desc[] = {
0, /* network control capabilities (none) */
0, /* network data capabilities ("raw" encapsulation) */
};
+#endif
#endif