From b5afbf003023d23f846a065d6ac99f1169b5e7b2 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 8 Aug 2013 00:53:22 +0200 Subject: [PATCH] backports: add hid log functions This adds some hid log functions like hid_warn(). This backports the following commit: commit 4291ee305e9bb0699504a66f0e2b7aefcf0512a5 Author: Joe Perches Date: Thu Dec 9 19:29:03 2010 -0800 HID: Add and use hid_: dev_ equivalents Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- backport/backport-include/linux/hid.h | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/backport/backport-include/linux/hid.h b/backport/backport-include/linux/hid.h index 22ff6f143f98..2cae9b7ec771 100644 --- a/backport/backport-include/linux/hid.h +++ b/backport/backport-include/linux/hid.h @@ -34,4 +34,49 @@ extern bool hid_ignore(struct hid_device *); .bus = BUS_BLUETOOTH, .vendor = (ven), .product = (prod) #endif +#ifndef hid_printk +#define hid_printk(level, hid, fmt, arg...) \ + dev_printk(level, &(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_emerg +#define hid_emerg(hid, fmt, arg...) \ + dev_emerg(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_crit +#define hid_crit(hid, fmt, arg...) \ + dev_crit(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_alert +#define hid_alert(hid, fmt, arg...) \ + dev_alert(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_err +#define hid_err(hid, fmt, arg...) \ + dev_err(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_notice +#define hid_notice(hid, fmt, arg...) \ + dev_notice(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_warn +#define hid_warn(hid, fmt, arg...) \ + dev_warn(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_info +#define hid_info(hid, fmt, arg...) \ + dev_info(&(hid)->dev, fmt, ##arg) +#endif + +#ifndef hid_dbg +#define hid_dbg(hid, fmt, arg...) \ + dev_dbg(&(hid)->dev, fmt, ##arg) +#endif + #endif /* __BACKPORT_HID_H */ -- 2.30.2