From: Jeff Mahoney <jeffm@suse.com>
To: Linux Kernel Maling List <linux-kernel@vger.kernel.org>,
Richard Zhao <richard.zhao@freescale.com>
Subject: [PATCH] chipidea: Allow user to select PCI/IMX options
Date: Mon, 27 Aug 2012 18:15:25 -0400 [thread overview]
Message-ID: <503BF17D.4080806@suse.com> (raw)
The chipidea driver currently has needless ifneq rules in the makefile
for things that should be config options. This can be problematic,
especially in the IMX case, since the OF_DEVICE dependency will be met
on powerpc systems - which don't actually support the hardware via that
method.
This patch adds _PCI and _IMX config options to allow the user to
select whether to build the modules.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
drivers/usb/chipidea/Kconfig | 11 +++++++++++
drivers/usb/chipidea/Makefile | 11 ++---------
2 files changed, 13 insertions(+), 9 deletions(-)
--- a/drivers/usb/chipidea/Kconfig
+++ b/drivers/usb/chipidea/Kconfig
@@ -31,4 +31,15 @@ config USB_CHIPIDEA_DEBUG
help
Say Y here to enable debugging output of the ChipIdea driver.
+config USB_CHIPIDEA_PCI
+ bool "ChipIdea PCI support"
+ depends on PCI
+ help
+ This option enables ChipIdea support on PCI.
+
+config USB_CHIPIDEA_IMX
+ bool "ChipIdea IMX support"
+ depends on OF_DEVICE
+ help
+ This option enables ChipIdea support on IMX.
endif
--- a/drivers/usb/chipidea/Makefile
+++ b/drivers/usb/chipidea/Makefile
@@ -8,12 +8,5 @@ ci_hdrc-$(CONFIG_USB_CHIPIDEA_DEBUG) +=
# Glue/Bridge layers go here
obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_msm.o
-
-# PCI doesn't provide stubs, need to check
-ifneq ($(CONFIG_PCI),)
- obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_pci.o
-endif
-
-ifneq ($(CONFIG_OF_DEVICE),)
- obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o
-endif
+obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci13xxx_pci.o
+obj-$(CONFIG_USB_CHIPIDEA_IMX) += ci13xxx_imx.o
--
Jeff Mahoney
SUSE Labs
reply other threads:[~2012-08-27 22:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=503BF17D.4080806@suse.com \
--to=jeffm@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.zhao@freescale.com \
/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
Powered by JetHome