1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2013 Google, Inc
6 * Pavel Herrmann <morpheus.ibis@gmail.com>
7 * Marek Vasut <marex@denx.de>
10 #ifndef _DM_DEVICE_COMPAT_H
11 #define _DM_DEVICE_COMPAT_H
13 #include <linux/compat.h>
17 * remove the following after resolving conflicts with <linux/compat.h>
37 * print device name like Linux
39 #define dev_printk(dev, fmt, ...) \
41 printk(fmt, ##__VA_ARGS__); \
44 #define __dev_printk(level, dev, fmt, ...) \
46 if (level < CONFIG_VAL(LOGLEVEL)) \
47 dev_printk(dev, fmt, ##__VA_ARGS__); \
50 #define dev_emerg(dev, fmt, ...) \
51 __dev_printk(0, dev, fmt, ##__VA_ARGS__)
52 #define dev_alert(dev, fmt, ...) \
53 __dev_printk(1, dev, fmt, ##__VA_ARGS__)
54 #define dev_crit(dev, fmt, ...) \
55 __dev_printk(2, dev, fmt, ##__VA_ARGS__)
56 #define dev_err(dev, fmt, ...) \
57 __dev_printk(3, dev, fmt, ##__VA_ARGS__)
58 #define dev_warn(dev, fmt, ...) \
59 __dev_printk(4, dev, fmt, ##__VA_ARGS__)
60 #define dev_notice(dev, fmt, ...) \
61 __dev_printk(5, dev, fmt, ##__VA_ARGS__)
62 #define dev_info(dev, fmt, ...) \
63 __dev_printk(6, dev, fmt, ##__VA_ARGS__)
66 #define dev_dbg(dev, fmt, ...) \
67 __dev_printk(7, dev, fmt, ##__VA_ARGS__)
69 #define dev_dbg(dev, fmt, ...) \
72 __dev_printk(7, dev, fmt, ##__VA_ARGS__); \
77 #define dev_vdbg dev_dbg
79 #define dev_vdbg(dev, fmt, ...) \
82 __dev_printk(7, dev, fmt, ##__VA_ARGS__); \