Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/spi Replace aprint_error with aprint_error_dev in co...



details:   https://anonhg.NetBSD.org/src/rev/5bd8db7d2165
branches:  trunk
changeset: 983295:5bd8db7d2165
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Fri May 14 09:25:14 2021 +0000

description:
Replace aprint_error with aprint_error_dev in config_interrupts callback.

diffstat:

 sys/dev/spi/m25p.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r 13d6abff82fc -r 5bd8db7d2165 sys/dev/spi/m25p.c
--- a/sys/dev/spi/m25p.c        Fri May 14 09:08:59 2021 +0000
+++ b/sys/dev/spi/m25p.c        Fri May 14 09:25:14 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: m25p.c,v 1.17 2021/01/27 02:32:31 thorpej Exp $ */
+/* $NetBSD: m25p.c,v 1.18 2021/05/14 09:25:14 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.17 2021/01/27 02:32:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m25p.c,v 1.18 2021/05/14 09:25:14 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -166,7 +166,7 @@
        /* first we try JEDEC ID read */
        cmd = SPIFLASH_CMD_RDJI;
        if (spi_send_recv(sc->sc_sh, 1, &cmd, 3, buf)) {
-               aprint_error(": failed to get JEDEC identification\n");
+               aprint_error_dev(self, "failed to get JEDEC identification\n");
                return;
        }
        mfgid = buf[0];
@@ -175,7 +175,8 @@
        if ((mfgid == 0xff) || (mfgid == 0)) {
                cmd = SPIFLASH_CMD_RDID;
                if (spi_send_recv(sc->sc_sh, 1, &cmd, 4, buf)) {
-                       aprint_error(": failed to get legacy signature\n");
+                       aprint_error_dev(self,
+                           "failed to get legacy signature\n");
                        return;
                }
                sig = buf[3];
@@ -192,8 +193,9 @@
        }
 
        if (info->name == NULL) {
-               aprint_error(": vendor 0x%02X dev 0x%04X sig 0x%02X not supported\n",
-                            mfgid, devid, sig);
+               aprint_error_dev(self,
+                   "vendor 0x%02X dev 0x%04X sig 0x%02X not supported\n",
+                    mfgid, devid, sig);
                return;
        }
 



Home | Main Index | Thread Index | Old Index