typedef __INT64_TYPE__ int64_t;
#endif
-typedef unsigned long uintptr_t;
+#ifdef __KERNEL__
+typedef phys_addr_t resource_size_t;
+#endif
+
/*
* Below are truly Linux-specific types that should never collide with
* any application/library that wants linux/types.h.