From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: pxa: Enable U2D only in case PXA3xx is enabled
Date: Mon, 6 Sep 2010 22:53:09 +0200 [thread overview]
Message-ID: <1283806389-18128-1-git-send-email-marek.vasut@gmail.com> (raw)
In case PXA3xx support isn't enabled in kernel, the pxa3xx_u2d_start_hc()
and pxa3xx_u2d_stop_hc() functions are undefined. Encapsulate their callings
with #ifdef CONFIG_PXA3xx macro.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
NOTE: I'm adding "Make a proper fix for this thing" into my ToDo. This is just a
quick patch since I have that exam soon. I'll go for approach 2) from what we
discussed in the other thread once the exam's past me.
drivers/usb/host/ohci-pxa27x.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index afef7b0..f3c60b9 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -236,8 +236,10 @@ static int pxa27x_start_hc(struct pxa27x_ohci *ohci, struct device *dev)
if (retval < 0)
return retval;
+#ifdef CONFIG_PXA3xx
if (cpu_is_pxa3xx())
pxa3xx_u2d_start_hc(&ohci_to_hcd(&ohci->ohci)->self);
+#endif
uhchr = __raw_readl(ohci->mmio_base + UHCHR) & ~UHCHR_SSE;
__raw_writel(uhchr, ohci->mmio_base + UHCHR);
@@ -255,8 +257,10 @@ static void pxa27x_stop_hc(struct pxa27x_ohci *ohci, struct device *dev)
inf = dev->platform_data;
+#ifdef CONFIG_PXA3xx
if (cpu_is_pxa3xx())
pxa3xx_u2d_stop_hc(&ohci_to_hcd(&ohci->ohci)->self);
+#endif
if (inf->exit)
inf->exit(dev);
--
1.7.1
next reply other threads:[~2010-09-06 20:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 20:53 Marek Vasut [this message]
2010-09-07 2:26 ` [PATCH] ARM: pxa: Enable U2D only in case PXA3xx is enabled Eric Miao
2010-09-07 5:56 ` Igor Grinberg
2010-09-07 6:11 ` Eric Miao
2010-09-07 6:26 ` Igor Grinberg
2010-09-07 6:45 ` Eric Miao
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=1283806389-18128-1-git-send-email-marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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