public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Michael Jones <michael.jones@matrix-vision.de>
Cc: balbi@ti.com, linux-omap@vger.kernel.org
Subject: Re: double_buffer_not_ok compile error
Date: Mon, 21 Feb 2011 15:25:02 +0200	[thread overview]
Message-ID: <20110221132438.GD23087@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <4D6261C8.1090605@matrix-vision.de>

Hi,

On Mon, Feb 21, 2011 at 01:59:52PM +0100, Michael Jones wrote:
> In commit 0662481855c389b75a0a54c32870cc90563d80a9, the member
> 'double_buffer_not_ok' was added to 'struct musb', but only inside
> #ifdef CONFIG_USB_GADGET_MUSB_HDRC.  In musb_host.c, this member is used
> outside of the same #ifdef, so I get a compile error because I have
> CONFIG_USB_GADGET_MUSB_HDRC=n (because I have CONFIG_USB_GADGET_OMAP=y).
> 
> here is the error:
> drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit':
> drivers/usb/musb/musb_host.c:612: error: 'struct musb' has no member
> named 'double_buffer_not_ok'
> 
> I'm not familiar enough with this to propose a correct patch, but for
> example with the patch below, I can compile the kernel.  Maybe the
> member definition can just be taken out of the #ifdef.
> 
> Can you propose a proper fix for this?

There's already a fix for that queued on Greg's queue ;-)

Thanks though

Here it is:

commit 5990378b393429244559f4750f2ee3a50929b932
Author: Felipe Balbi <balbi@ti.com>
Date:   Fri Feb 11 10:00:02 2011 +0200

    usb: musb: fix build breakage
    
    commit 0662481855c389b75a0a54c32870cc90563d80a9
    (usb: musb: disable double buffering when it's broken),
    introduced a compile error when gadget API is disabled.
    
    Fix it.
    
    Signed-off-by: Felipe Balbi <balbi@ti.com>

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index d74a811..e6400be 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -488,6 +488,15 @@ struct musb {
        unsigned                set_address:1;
        unsigned                test_mode:1;
        unsigned                softconnect:1;
+
+       u8                      address;
+       u8                      test_mode_nr;
+       u16                     ackpend;                /* ep0 */
+       enum musb_g_ep0_state   ep0_state;
+       struct usb_gadget       g;                      /* the gadget */
+       struct usb_gadget_driver *gadget_driver;        /* its driver */
+#endif
+
        /*
         * FIXME: Remove this flag.
         *
@@ -501,14 +510,6 @@ struct musb {
         */
        unsigned                double_buffer_not_ok:1 __deprecated;
 
-       u8                      address;
-       u8                      test_mode_nr;
-       u16                     ackpend;                /* ep0 */
-       enum musb_g_ep0_state   ep0_state;
-       struct usb_gadget       g;                      /* the gadget */
-       struct usb_gadget_driver *gadget_driver;        /* its driver */
-#endif
-
        struct musb_hdrc_config *config;
 
 #ifdef MUSB_CONFIG_PROC_FS

-- 
balbi

  reply	other threads:[~2011-02-21 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 12:59 double_buffer_not_ok compile error Michael Jones
2011-02-21 13:25 ` Felipe Balbi [this message]
2011-02-21 13:54   ` Michael Jones
2011-02-21 13:56     ` Felipe Balbi
2011-02-24 13:31       ` Markos Chandras

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=20110221132438.GD23087@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=michael.jones@matrix-vision.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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