blob: 5cbe377e3cd9a17fa6b15c57d4c8efd35b4d8f86 [file] [log] [blame]
Kishon Vijay Abraham Ie23c9202015-02-23 18:39:57 +05301/**
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 *
Kishon Vijay Abraham Ie23c9202015-02-23 18:39:57 +05308 * SPDX-License-Identifier: GPL-2.0
9 *
10 */
11
12#ifndef __DWC3_LINUX_COMPAT__
13#define __DWC3_LINUX_COMPAT__
14
Kishon Vijay Abraham Ie23c9202015-02-23 18:39:57 +053015#define WARN(val, format, arg...) debug(format, ##arg)
Kishon Vijay Abraham I9c38ca42015-02-23 18:40:00 +053016#define dev_WARN(dev, format, arg...) debug(format, ##arg)
Kishon Vijay Abraham Ie23c9202015-02-23 18:39:57 +053017
Kishon Vijay Abraham Ie23c9202015-02-23 18:39:57 +053018static inline size_t strlcat(char *dest, const char *src, size_t n)
19{
20 strcat(dest, src);
21 return strlen(dest) + strlen(src);
22}
23
Kishon Vijay Abraham I99030d72015-02-23 18:40:02 +053024static inline void *devm_kzalloc(struct device *dev, unsigned int size,
25 unsigned int flags)
26{
27 return kzalloc(size, flags);
28}
Kishon Vijay Abraham Ie23c9202015-02-23 18:39:57 +053029#endif