Merge branch 'master' of ../../drm into modesetting-101
[profile/ivi/libdrm.git] / linux-core / drm_compat.h
index 8f2d9a9..03838a1 100644 (file)
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
 #undef DRM_IRQ_ARGS
 #define DRM_IRQ_ARGS           int irq, void *arg, struct pt_regs *regs
+
+typedef _Bool bool;
+enum {
+        false   = 0,
+        true    = 1
+};
+
 #endif
 
 #ifndef list_for_each_safe
@@ -152,7 +159,7 @@ static __inline__ void *kcalloc(size_t nmemb, size_t size, int flags)
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 #define vmalloc_user(_size) ({void * tmp = vmalloc(_size);   \
-      if (tmp) memset(tmp, 0, size);                        \
+      if (tmp) memset(tmp, 0, _size);                       \
       (tmp);})
 #endif
 
@@ -325,7 +332,15 @@ void *idr_replace(struct idr *idp, void *ptr, int id);
 #endif
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
-typedef _Bool                   bool;
+extern unsigned long round_jiffies_relative(unsigned long j);
+#endif
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19))
+extern struct pci_dev * pci_get_bus_and_slot(unsigned int bus, unsigned int devfn);
+#endif
+
+#ifndef PM_EVENT_PRETHAW 
+#define PM_EVENT_PRETHAW 3
 #endif
 
 #if (defined(CONFIG_X86) && defined(CONFIG_X86_32) && defined(CONFIG_HIMEM))