drm: Add Linux compatibility macros
authorMichael Neumann <mneumann@ntecs.de>
Tue, 24 Feb 2015 10:46:12 +0000 (11:46 +0100)
committerMichael Neumann <mneumann@ntecs.de>
Tue, 24 Feb 2015 11:08:37 +0000 (12:08 +0100)
sys/dev/drm/include/linux/bitops.h
sys/dev/drm/include/linux/device.h

index 1505f46..f7b794c 100644 (file)
@@ -31,6 +31,7 @@
 #include <sys/types.h>
 #include <sys/systm.h>
 
+#define BIT(nr)                        (1UL << (nr))
 #ifdef __LP64__
 #define        BITS_PER_LONG           64
 #else
index a1c1ca4..b92816f 100644 (file)
@@ -33,5 +33,7 @@
        device_printf((dev), "warning: " fmt, ## __VA_ARGS__)
 #define        dev_info(dev, fmt, ...)                                         \
        device_printf((dev), "info: " fmt, ## __VA_ARGS__)
+#define        dev_printk(level, dev, fmt, ...)                                                \
+       device_printf((dev), "%s: " fmt, level, ## __VA_ARGS__)
 
 #endif /* _LINUX_DEVICE_H_ */