Skip to content

Commit ad049d5

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.4/core' into for-linus
- fixes for formatting / ratelimiting kernel log by HID core, from Joshua Clayton Signed-off-by: Jiri Kosina <[email protected]>
2 parents 7147935 + 0af10ee commit ad049d5

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

drivers/hid/hid-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,8 +1311,8 @@ u32 hid_field_extract(const struct hid_device *hid, u8 *report,
13111311
unsigned offset, unsigned n)
13121312
{
13131313
if (n > 32) {
1314-
hid_warn(hid, "hid_field_extract() called with n (%d) > 32! (%s)\n",
1315-
n, current->comm);
1314+
hid_warn_once(hid, "%s() called with n (%d) > 32! (%s)\n",
1315+
__func__, n, current->comm);
13161316
n = 32;
13171317
}
13181318

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@
568568
#define USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A 0x0b4a
569569
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE 0x134a
570570
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A 0x094a
571+
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941 0x0941
571572
#define USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641 0x0641
572573

573574
#define USB_VENDOR_ID_HUION 0x256c

drivers/hid/hid-quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ static const struct hid_device_id hid_quirks[] = {
9292
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_LOGITECH_OEM_USB_OPTICAL_MOUSE_0B4A), HID_QUIRK_ALWAYS_POLL },
9393
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
9494
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_094A), HID_QUIRK_ALWAYS_POLL },
95+
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0941), HID_QUIRK_ALWAYS_POLL },
9596
{ HID_USB_DEVICE(USB_VENDOR_ID_HP, USB_PRODUCT_ID_HP_PIXART_OEM_USB_OPTICAL_MOUSE_0641), HID_QUIRK_ALWAYS_POLL },
9697
{ HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6680), HID_QUIRK_MULTI_INPUT },
9798
{ HID_USB_DEVICE(USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI), HID_QUIRK_MULTI_INPUT },

include/linux/hid.h

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,29 +1154,32 @@ int hid_pidff_init(struct hid_device *hid);
11541154
#define hid_pidff_init NULL
11551155
#endif
11561156

1157-
#define dbg_hid(format, arg...) \
1157+
#define dbg_hid(fmt, ...) \
11581158
do { \
11591159
if (hid_debug) \
1160-
printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \
1160+
printk(KERN_DEBUG "%s: " fmt, __FILE__, ##__VA_ARGS__); \
11611161
} while (0)
11621162

1163-
#define hid_printk(level, hid, fmt, arg...) \
1164-
dev_printk(level, &(hid)->dev, fmt, ##arg)
1165-
#define hid_emerg(hid, fmt, arg...) \
1166-
dev_emerg(&(hid)->dev, fmt, ##arg)
1167-
#define hid_crit(hid, fmt, arg...) \
1168-
dev_crit(&(hid)->dev, fmt, ##arg)
1169-
#define hid_alert(hid, fmt, arg...) \
1170-
dev_alert(&(hid)->dev, fmt, ##arg)
1171-
#define hid_err(hid, fmt, arg...) \
1172-
dev_err(&(hid)->dev, fmt, ##arg)
1173-
#define hid_notice(hid, fmt, arg...) \
1174-
dev_notice(&(hid)->dev, fmt, ##arg)
1175-
#define hid_warn(hid, fmt, arg...) \
1176-
dev_warn(&(hid)->dev, fmt, ##arg)
1177-
#define hid_info(hid, fmt, arg...) \
1178-
dev_info(&(hid)->dev, fmt, ##arg)
1179-
#define hid_dbg(hid, fmt, arg...) \
1180-
dev_dbg(&(hid)->dev, fmt, ##arg)
1163+
#define hid_err(hid, fmt, ...) \
1164+
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
1165+
#define hid_notice(hid, fmt, ...) \
1166+
dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
1167+
#define hid_warn(hid, fmt, ...) \
1168+
dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
1169+
#define hid_info(hid, fmt, ...) \
1170+
dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
1171+
#define hid_dbg(hid, fmt, ...) \
1172+
dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
1173+
1174+
#define hid_err_once(hid, fmt, ...) \
1175+
dev_err_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1176+
#define hid_notice_once(hid, fmt, ...) \
1177+
dev_notice_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1178+
#define hid_warn_once(hid, fmt, ...) \
1179+
dev_warn_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1180+
#define hid_info_once(hid, fmt, ...) \
1181+
dev_info_once(&(hid)->dev, fmt, ##__VA_ARGS__)
1182+
#define hid_dbg_once(hid, fmt, ...) \
1183+
dev_dbg_once(&(hid)->dev, fmt, ##__VA_ARGS__)
11811184

11821185
#endif

0 commit comments

Comments
 (0)