Commit ad049d52 authored by Jiri Kosina's avatar Jiri Kosina

Merge branch 'for-5.4/core' into for-linus

- fixes for formatting / ratelimiting kernel log by HID core, from
  Joshua Clayton
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parents 7147935a 0af10eed
......@@ -1311,8 +1311,8 @@ u32 hid_field_extract(const struct hid_device *hid, u8 *report,
unsigned offset, unsigned n)
{
if (n > 32) {
hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n",
n, current->comm);
hid_warn_once(hid, "%s() called with n (%d) > 32! (%s)\n",
__func__, n, current->comm);
n = 32;
}
......
......@@ -568,6 +568,7 @@
#define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A 0x0b4a
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE 0x134a
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A 0x094a
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941 0x0941
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641 0x0641
#define USB_VENDOR_ID_HUION 0x256c
......
......@@ -92,6 +92,7 @@ static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680), HID_QUIRK_MULTI_INPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI), HID_QUIRK_MULTI_INPUT },
......
......@@ -1154,29 +1154,32 @@ int hid_pidff_init(struct hid_device *hid);
#define hid_pidff_init NULL
#endif
#define dbg_hid(format, arg...) \
#define dbg_hid(fmt, ...) \
do { \
if (hid_debug) \
printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \
printk(KERN_DEBUG "%s: " fmt, __FILE__, ##__VA_ARGS__); \
} while (0)
#define hid_printk(level, hid, fmt, arg...) \
dev_printk(level, &(hid)->dev, fmt, ##arg)
#define hid_emerg(hid, fmt, arg...) \
dev_emerg(&(hid)->dev, fmt, ##arg)
#define hid_crit(hid, fmt, arg...) \
dev_crit(&(hid)->dev, fmt, ##arg)
#define hid_alert(hid, fmt, arg...) \
dev_alert(&(hid)->dev, fmt, ##arg)
#define hid_err(hid, fmt, arg...) \
dev_err(&(hid)->dev, fmt, ##arg)
#define hid_notice(hid, fmt, arg...) \
dev_notice(&(hid)->dev, fmt, ##arg)
#define hid_warn(hid, fmt, arg...) \
dev_warn(&(hid)->dev, fmt, ##arg)
#define hid_info(hid, fmt, arg...) \
dev_info(&(hid)->dev, fmt, ##arg)
#define hid_dbg(hid, fmt, arg...) \
dev_dbg(&(hid)->dev, fmt, ##arg)
#define hid_err(hid, fmt, ...) \
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
#define hid_notice(hid, fmt, ...) \
dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
#define hid_warn(hid, fmt, ...) \
dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
#define hid_info(hid, fmt, ...) \
dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
#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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment