[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1425489871-22415-10-git-send-email-peter@hurleysoftware.com>
Date: Wed, 4 Mar 2015 12:24:28 -0500
From: Peter Hurley <peter@...leysoftware.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Peter Hurley <peter@...leysoftware.com>
Subject: [PATCH -next 09/12] of: earlycon: Allow multiple OF_EARLYCON_DECLARE() with same name
Since matching is performed only on the compatible string, allow
multiple declarations of OF_EARLYCON_DECLARE() with the same name.
For example,
OF_EARLYCON_DECLARE(omap8250, "ti,omap2-uart", early_omap8250_setup);
OF_EARLYCON_DECLARE(omap8250, "ti,omap3-uart", early_omap8250_setup);
OF_EARLYCON_DECLARE(omap8250, "ti,omap4-uart", early_omap8250_setup);
Generate a unique identifier for each declaration in the current
compilation unit.
Signed-off-by: Peter Hurley <peter@...leysoftware.com>
---
include/linux/serial_core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 675d36f..0a711a7 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -362,7 +362,7 @@ extern int of_setup_earlycon(const struct of_device_id *match,
#endif
#define OF_EARLYCON_DECLARE(_name, compat, fn) \
- static const struct of_device_id __of_table_##_name \
+ static const struct of_device_id __UNIQUE_ID(_name) \
EARLYCON_OF_TABLE_ATTR \
= { .name = __stringify(_name), \
.compatible = compat, \
--
2.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists