]> git.sur5r.net Git - u-boot/blob - drivers/usb/dwc3/linux-compat.h
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / drivers / usb / dwc3 / linux-compat.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /**
3  * linux-compat.h - DesignWare USB3 Linux Compatibiltiy Adapter  Header
4  *
5  * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com
6  *
7  * Authors: Kishon Vijay Abraham I <kishon@ti.com>
8  *
9  */
10
11 #ifndef __DWC3_LINUX_COMPAT__
12 #define __DWC3_LINUX_COMPAT__
13
14 #define WARN(val, format, arg...)       debug(format, ##arg)
15 #define dev_WARN(dev, format, arg...)   debug(format, ##arg)
16
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
23 static inline void *devm_kzalloc(struct device *dev, unsigned int size,
24                                  unsigned int flags)
25 {
26         return kzalloc(size, flags);
27 }
28 #endif