From: Michael Jones <michael.jones@matrix-vision.de>
To: balbi@ti.com
Cc: linux-omap@vger.kernel.org
Subject: double_buffer_not_ok compile error
Date: Mon, 21 Feb 2011 13:59:52 +0100 [thread overview]
Message-ID: <4D6261C8.1090605@matrix-vision.de> (raw)
Hi Felipe,
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?
thanks,
Michael Jones
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 0f523d7..809965f 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -609,9 +609,11 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, struct musb_hw_ep *ep)
/* Set RXMAXP with the FIFO size of the endpoint
* to disable double buffer mode.
*/
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
if (musb->double_buffer_not_ok)
musb_writew(ep->regs, MUSB_RXMAXP, ep->max_packet_sz_rx);
else
+#endif
musb_writew(ep->regs, MUSB_RXMAXP,
qh->maxpacket | ((qh->hb_mult - 1) << 11));
@@ -784,10 +786,12 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
/* protocol/endpoint/interval/NAKlimit */
if (epnum) {
musb_writeb(epio, MUSB_TXTYPE, qh->type_reg);
+#ifdef CONFIG_USB_GADGET_MUSB_HDRC
if (musb->double_buffer_not_ok)
musb_writew(epio, MUSB_TXMAXP,
hw_ep->max_packet_sz_tx);
else
+#endif
musb_writew(epio, MUSB_TXMAXP,
qh->maxpacket |
((qh->hb_mult - 1) << 11));
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
next reply other threads:[~2011-02-21 13:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 12:59 Michael Jones [this message]
2011-02-21 13:25 ` double_buffer_not_ok compile error Felipe Balbi
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=4D6261C8.1090605@matrix-vision.de \
--to=michael.jones@matrix-vision.de \
--cc=balbi@ti.com \
--cc=linux-omap@vger.kernel.org \
/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