Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: nintendo: Rate limit IMU compensation message

Some controllers are very bad at updating the IMU, leading to these
messages spamming the syslog. Rate-limiting them helps with this a bit.

Signed-off-by: Vicki Pfau <vi@endrift.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Vicki Pfau and committed by
Jiri Kosina
b8874720 b73bc6a5

+2 -2
+2 -2
drivers/hid/hid-nintendo.c
··· 1455 1455 ctlr->imu_avg_delta_ms; 1456 1456 ctlr->imu_timestamp_us += 1000 * ctlr->imu_avg_delta_ms; 1457 1457 if (dropped_pkts > JC_IMU_DROPPED_PKT_WARNING) { 1458 - hid_warn(ctlr->hdev, 1458 + hid_warn_ratelimited(ctlr->hdev, 1459 1459 "compensating for %u dropped IMU reports\n", 1460 1460 dropped_pkts); 1461 - hid_warn(ctlr->hdev, 1461 + hid_warn_ratelimited(ctlr->hdev, 1462 1462 "delta=%u avg_delta=%u\n", 1463 1463 delta, ctlr->imu_avg_delta_ms); 1464 1464 }