public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime•net>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
	akpm <akpm@linux-foundation•org>,
	gregkh@suse•de
Cc: linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
	Felipe Balbi <balbi@ti•com>,
	linux-omap@vger•kernel.org
Subject: [PATCH -next] usb: fix dwc3 build when USB_GADGET_DWC3 is not enabled
Date: Tue, 23 Aug 2011 11:07:02 -0700	[thread overview]
Message-ID: <20110823110702.f5ea377c.rdunlap@xenotime.net> (raw)
In-Reply-To: <20110823160432.d24f8cad00951286bc18461e@canb.auug.org.au>

From: Randy Dunlap <rdunlap@xenotime•net>

Fix build error when CONFIG_USB_GADGET_DWC3 is not enabled:

ERROR: "dwc3_send_gadget_ep_cmd" [drivers/usb/dwc3/dwc3.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime•net>
---
 drivers/usb/dwc3/debugfs.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20110823.orig/drivers/usb/dwc3/debugfs.c
+++ linux-next-20110823/drivers/usb/dwc3/debugfs.c
@@ -437,7 +437,9 @@ static int dwc3_testmode_open(struct ino
 	struct dwc3_gadget_ep_cmd_params par0;
 	struct dwc3_gadget_ep_cmd_params par1;
 	struct dwc3_trb         trb;
+#ifdef CONFIG_USB_GADGET_DWC3
 	int ret;
+#endif
 	u8 *buf0;
 	u8 *buf1;
 
@@ -478,8 +480,10 @@ static int dwc3_testmode_open(struct ino
 
 	dwc3_send_testmode_cmd(dwc, 1);
 
+#ifdef CONFIG_USB_GADGET_DWC3
 	ret = dwc3_send_gadget_ep_cmd(dwc, 0, DWC3_DEPCMD_STARTTRANSFER, &par0);
 	ret = dwc3_send_gadget_ep_cmd(dwc, 1, DWC3_DEPCMD_STARTTRANSFER, &par1);
+#endif
 
 	dwc3_send_testmode_cmd(dwc, 0);
 	return -EBUSY;

  reply	other threads:[~2011-08-23 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23  6:04 linux-next: Tree for Aug 23 Stephen Rothwell
2011-08-23 18:07 ` Randy Dunlap [this message]
2011-08-23 18:52   ` [PATCH -next] usb: fix dwc3 build when USB_GADGET_DWC3 is not enabled Felipe Balbi
2011-08-23 19:52     ` [PATCH -next v2] " Randy Dunlap
2011-08-24  8:51       ` Felipe Balbi
2011-08-23 18:22 ` [PATCH -next] usb: fix ipw.c build error, select USB_SERIAL_WWAN Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110823110702.f5ea377c.rdunlap@xenotime.net \
    --to=rdunlap@xenotime$(echo .)net \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=balbi@ti$(echo .)com \
    --cc=gregkh@suse$(echo .)de \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=linux-omap@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox