Module Name: src
Committed By: riastradh
Date: Fri Jan 14 22:26:35 UTC 2022
Modified Files:
src/sys/dev/i2c: ihidev.c
Log Message:
ihidev(4): Allocate report buffer with KM_SLEEP.
Limited to 64k and only happens on attach anyway. Let's not leave a
rake to trip on here.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/i2c/ihidev.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/ihidev.c
diff -u src/sys/dev/i2c/ihidev.c:1.21 src/sys/dev/i2c/ihidev.c:1.22
--- src/sys/dev/i2c/ihidev.c:1.21 Fri Jan 14 22:25:49 2022
+++ src/sys/dev/i2c/ihidev.c Fri Jan 14 22:26:35 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.21 2022/01/14 22:25:49 riastradh Exp $ */
+/* $NetBSD: ihidev.c,v 1.22 2022/01/14 22:26:35 riastradh Exp $ */
/* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
/*-
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.21 2022/01/14 22:25:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.22 2022/01/14 22:26:35 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -643,7 +643,7 @@ ihidev_hid_desc_parse(struct ihidev_soft
}
sc->sc_reportlen = le16toh(sc->hid_desc.wReportDescLength);
- sc->sc_report = kmem_zalloc(sc->sc_reportlen, KM_NOSLEEP);
+ sc->sc_report = kmem_zalloc(sc->sc_reportlen, KM_SLEEP);
if (ihidev_hid_command(sc, I2C_HID_REPORT_DESCR, 0, false)) {
aprint_error_dev(sc->sc_dev, "failed fetching HID report\n");