Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: include/dev/driver.h

Issue 1737903002: Move concat define to the one place that needs it. (Closed) Base URL: https://github.com/littlekernel/lk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/compiler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/dev/driver.h
diff --git a/include/dev/driver.h b/include/dev/driver.h
index c45cac85a4842efa3d7c180caa670610a03b463b..3622fea296c279e32f9d19641643bcc294575802 100644
--- a/include/dev/driver.h
+++ b/include/dev/driver.h
@@ -68,6 +68,10 @@ struct driver {
const struct driver_ops *ops;
};
+/* macro-expanding concat */
+#define concat(a, b) __ex_concat(a, b)
+#define __ex_concat(a, b) a ## b
+
#define DRIVER_EXPORT(type_, ops_) \
const struct driver concat(__driver_, type_) \
__ALIGNED(sizeof(void *)) __SECTION(".drivers") = { \
« no previous file with comments | « include/compiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698