@@ -213,6 +213,11 @@ static inline u32 reciprocal_scale(u32 val, u32 ep_ro)
}
#endif /* LINUX_VERSION_IS_LESS(3,14,0) */
+#if LINUX_VERSION_IS_LESS(3,18,0)
+#define bin2hex LINUX_BACKPORT(bin2hex)
+extern char *bin2hex(char *dst, const void *src, size_t count);
+#endif
+
#endif /* __BACKPORT_KERNEL_H */
/*
@@ -320,3 +320,13 @@ void memzero_explicit(void *s, size_t count)
}
EXPORT_SYMBOL_GPL(memzero_explicit);
#endif
+
+char *bin2hex(char *dst, const void *src, size_t count)
+{
+ const unsigned char *_src = src;
+
+ while (count--)
+ dst = hex_byte_pack(dst, *_src++);
+ return dst;
+}
+EXPORT_SYMBOL(bin2hex);