From 58facf3359453584a480f6b640162c1310cabc04 Mon Sep 17 00:00:00 2001 From: anton Date: Thu, 2 Sep 2021 15:15:12 +0000 Subject: [PATCH] Explain in a comment why two wscons_keydesc structures are needed. --- sys/dev/usb/ucc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/ucc.c b/sys/dev/usb/ucc.c index b5266235975..0c87925bc53 100644 --- a/sys/dev/usb/ucc.c +++ b/sys/dev/usb/ucc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucc.c,v 1.23 2021/09/01 10:41:39 anton Exp $ */ +/* $OpenBSD: ucc.c,v 1.24 2021/09/02 15:15:12 anton Exp $ */ /* * Copyright (c) 2021 Anton Lindqvist @@ -82,6 +82,10 @@ struct ucc_softc { u_char sc_last_raw; }; + /* + * Only the first element is populated whereas the second remains zeroed + * out since such trailing sentinel is required by wskbd_load_keymap(). + */ struct wscons_keydesc sc_keydesc[2]; struct wskbd_mapdata sc_keymap; }; -- 2.20.1