[PATCH] drivers: mfd: mfd-core: disable irq_domain related code when'HAVE_GENERIC_HARDIRQS' disabled.

From: Chen Gang
Date: Tue Jul 23 2013 - 23:34:14 EST


'irq_domain' depends on hard irqs, so for the architectures which have
no hard irqs, but still need mfd (e.g. s390), need disable the related
code, or can not pass compiling.

The related commit:

"c94bb23 mfd: Make MFD core code Device Tree and IRQ domain aware"

The related error: (with allmodconfig under s390)

ERROR: "irq_create_mapping" [drivers/mfd/mfd-core.ko] undefined!


Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx>
---
drivers/mfd/mfd-core.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 7604f4e..8e56a74 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -129,13 +129,16 @@ static int mfd_add_device(struct device *parent, int id,
res[r].end = mem_base->start +
cell->resources[r].end;
} else if (cell->resources[r].flags & IORESOURCE_IRQ) {
+#ifdef HAVE_GENERIC_HARDIRQS
if (domain) {
/* Unable to create mappings for IRQ ranges. */
WARN_ON(cell->resources[r].start !=
cell->resources[r].end);
res[r].start = res[r].end = irq_create_mapping(
domain, cell->resources[r].start);
- } else {
+ } else
+#endif
+ {
res[r].start = irq_base +
cell->resources[r].start;
res[r].end = irq_base +
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/