HID: core: Add printk_once variants to hid_warn() etc
authorJoshua Clayton <stillcompiling@gmail.com>
Mon, 12 Aug 2019 15:20:21 +0000 (09:20 -0600)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 18 Sep 2019 13:58:13 +0000 (15:58 +0200)
hid_warn_once() is needed. Add the others as part of the block.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
include/linux/hid.h

index e6c7efdb0458b05d365b0e593c95cf22a0ebf506..cd41f209043f6dabe779040724883e14b75129c6 100644 (file)
@@ -1171,4 +1171,15 @@ do {                                                                     \
 #define hid_dbg(hid, fmt, ...)                         \
        dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
 
+#define hid_err_once(hid, fmt, ...)                    \
+       dev_err_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_notice_once(hid, fmt, ...)                 \
+       dev_notice_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_warn_once(hid, fmt, ...)                   \
+       dev_warn_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_info_once(hid, fmt, ...)                   \
+       dev_info_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+#define hid_dbg_once(hid, fmt, ...)                    \
+       dev_dbg_once(&(hid)->dev, fmt, ##__VA_ARGS__)
+
 #endif