Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbport Make the error message from pms_alps_probe_...
details: https://anonhg.NetBSD.org/src/rev/0daab9a10745
branches: trunk
changeset: 320022:0daab9a10745
user: uwe <uwe%NetBSD.org@localhost>
date: Tue Jun 19 23:25:59 2018 +0000
description:
Make the error message from pms_alps_probe_init() an error again now
that we don't misidentify almost anything as an ALPS device. Reset if
E6 check failed as well.
diffstat:
sys/dev/pckbport/alps.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 3af6730dcfef -r 0daab9a10745 sys/dev/pckbport/alps.c
--- a/sys/dev/pckbport/alps.c Tue Jun 19 23:03:28 2018 +0000
+++ b/sys/dev/pckbport/alps.c Tue Jun 19 23:25:59 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alps.c,v 1.9 2018/06/19 23:03:28 uwe Exp $ */
+/* $NetBSD: alps.c,v 1.10 2018/06/19 23:25:59 uwe Exp $ */
/*-
* Copyright (c) 2017 Ryo ONODERA <ryo%tetera.org@localhost>
@@ -30,7 +30,7 @@
#include "opt_pms.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: alps.c,v 1.9 2018/06/19 23:03:28 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: alps.c,v 1.10 2018/06/19 23:25:59 uwe Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -169,7 +169,7 @@
e6sig[1] != 0x00 ||
e6sig[2] != 0x64)
{
- return ENODEV;
+ return ENODEV; /* This is not an ALPS device */
}
aprint_debug_dev(psc->sc_dev,
@@ -219,7 +219,7 @@
e7sig[0], e7sig[1], e7sig[2]);
if (e7sig[0] != 0x73)
- return ENODEV;
+ return ENODEV; /* This is not an ALPS device */
return 0;
err:
@@ -701,7 +701,7 @@
pckbport_flush(psc->sc_kbctag, psc->sc_kbcslot);
if ((res = pms_alps_e6sig(psc, e6sig)) != 0)
- return res; /* This is not ALPS device */
+ goto err;
if ((res = pms_alps_e7sig(psc, e7sig)) != 0)
goto err;
@@ -758,7 +758,7 @@
(void)pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot,
cmd, 1, 2, NULL, 1);
if (res != ENODEV)
- aprint_verbose_dev(psc->sc_dev, "Failed to initialize an ALPS device.\n");
+ aprint_error_dev(psc->sc_dev, "Failed to initialize an ALPS device.\n");
return res;
}
Home |
Main Index |
Thread Index |
Old Index