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

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

Hi,

On Tue, Aug 23, 2011 at 11:07:02AM -0700, Randy Dunlap wrote:
> 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

instead of adding the ifdef here, would you add it gadget.h and provide
a nop when we're not building the gadget side ?

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2011-08-23 18:52 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 ` [PATCH -next] usb: fix dwc3 build when USB_GADGET_DWC3 is not enabled Randy Dunlap
2011-08-23 18:52   ` Felipe Balbi [this message]
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=20110823185235.GA11299@legolas.emea.dhcp.ti.com \
    --to=balbi@ti$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --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=rdunlap@xenotime$(echo .)net \
    --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