Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c ihidev(4): Allocate report buffer with KM_SLEEP.



details:   https://anonhg.NetBSD.org/src/rev/d1e4fd728e45
branches:  trunk
changeset: 359622:d1e4fd728e45
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Jan 14 22:26:35 2022 +0000

description:
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.

diffstat:

 sys/dev/i2c/ihidev.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 67144db8599f -r d1e4fd728e45 sys/dev/i2c/ihidev.c
--- a/sys/dev/i2c/ihidev.c      Fri Jan 14 22:25:49 2022 +0000
+++ b/sys/dev/i2c/ihidev.c      Fri Jan 14 22:26:35 2022 +0000
@@ -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 @@
        }
 
        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");



Home | Main Index | Thread Index | Old Index