]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/drm/drmP.h
drm: fix potential dangling else problems in for_each_ macros
[karo-tx-linux.git] / include / drm / drmP.h
index 0b921ae06cd83585e1d1cf2adb6baf665f203013..30d4a5a495e25661c9d1e2498b26dadf40ad9a17 100644 (file)
@@ -1111,4 +1111,7 @@ static __inline__ bool drm_can_sleep(void)
        return true;
 }
 
+/* helper for handling conditionals in various for_each macros */
+#define for_each_if(condition) if (!(condition)) {} else
+
 #endif