linux-compat.h 802 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * linux-compat.h - DesignWare USB3 Linux Compatibiltiy Adapter Header
  3. *
  4. * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * Authors: Kishon Vijay Abraham I <kishon@ti.com>
  7. *
  8. * SPDX-License-Identifier: GPL-2.0
  9. *
  10. */
  11. #ifndef __DWC3_LINUX_COMPAT__
  12. #define __DWC3_LINUX_COMPAT__
  13. #define pr_debug(format) debug(format)
  14. #define WARN(val, format, arg...) debug(format, ##arg)
  15. #define dev_WARN(dev, format, arg...) debug(format, ##arg)
  16. #define WARN_ON_ONCE(val) debug("Error %d\n", val)
  17. static inline size_t strlcat(char *dest, const char *src, size_t n)
  18. {
  19. strcat(dest, src);
  20. return strlen(dest) + strlen(src);
  21. }
  22. static inline void *devm_kzalloc(struct device *dev, unsigned int size,
  23. unsigned int flags)
  24. {
  25. return kzalloc(size, flags);
  26. }
  27. #endif