git: a7727e1a6d5d - main - linuxkpi: Add dev_info_once
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 08 Aug 2022 14:04:26 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=a7727e1a6d5d6120d439af222f58345b4932100c
commit a7727e1a6d5d6120d439af222f58345b4932100c
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-08-02 08:22:59 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-08-08 13:22:36 +0000
linuxkpi: Add dev_info_once
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36021
---
sys/compat/linuxkpi/common/include/linux/device.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
index e39b3f95ca0d..1c26cecfd955 100644
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -193,6 +193,14 @@ show_class_attr_string(struct class *class,
#define dev_printk(lvl, dev, fmt, ...) \
device_printf((dev)->bsddev, fmt, ##__VA_ARGS__)
+#define dev_info_once(dev, ...) do { \
+ static bool __dev_info_once; \
+ if (!__dev_info_once) { \
+ __dev_info_once = true; \
+ dev_info(dev, __VA_ARGS__); \
+ } \
+} while (0)
+
#define dev_err_once(dev, ...) do { \
static bool __dev_err_once; \
if (!__dev_err_once) { \