Fix SDMMC_DEBUG build
authorkn <kn@openbsd.org>
Sat, 27 Mar 2021 14:36:28 +0000 (14:36 +0000)
committerkn <kn@openbsd.org>
Sat, 27 Mar 2021 14:36:28 +0000 (14:36 +0000)
- Replace undefined SDMMCDEVNAME macro with usual DEVNAME from sdmmcvar.h
- typofix struct member name

sys/dev/sdmmc/sdmmc_mem.c
sys/dev/sdmmc/sdmmc_scsi.c

index 59bcb1b..fae8d63 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sdmmc_mem.c,v 1.35 2020/08/24 15:06:10 kettenis Exp $ */
+/*     $OpenBSD: sdmmc_mem.c,v 1.36 2021/03/27 14:36:28 kn Exp $       */
 
 /*
  * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -188,7 +188,7 @@ sdmmc_mem_enable(struct sdmmc_softc *sc)
                error = sdmmc_mmc_command(sc, &cmd);
                if (error) {
                        DPRINTF(("%s: voltage switch command failed\n",
-                           SDMMCDEVNAME(sc)));
+                           DEVNAME(sc)));
                        return error;
                }
 
@@ -220,7 +220,7 @@ sdmmc_mem_signal_voltage(struct sdmmc_softc *sc, int signal_voltage)
         * Card switch command was successful, update host controller
         * signal voltage setting.
         */
-       DPRINTF(("%s: switching host to %s\n", SDMMCDEVNAME(sc),
+       DPRINTF(("%s: switching host to %s\n", DEVNAME(sc),
            signal_voltage == SDMMC_SIGNAL_VOLTAGE_180 ? "1.8V" : "3.3V"));
        error = sdmmc_chip_signal_voltage(sc->sct, sc->sch, signal_voltage);
        if (error)
@@ -738,7 +738,7 @@ sdmmc_mem_execute_tuning(struct sdmmc_softc *sc, struct sdmmc_function *sf)
                }
        }
 
-       DPRINTF(("%s: execute tuning for timing %d\n", SDMMCDEVNAME(sc),
+       DPRINTF(("%s: execute tuning for timing %d\n", DEVNAME(sc),
            timing));
 
        return sdmmc_chip_execute_tuning(sc->sct, sc->sch, timing);
@@ -814,13 +814,13 @@ sdmmc_mem_sd_init(struct sdmmc_softc *sc, struct sdmmc_function *sf)
                        if (!(support_func & (1 << i)))
                                continue;
                        DPRINTF(("%s: card supports mode %s\n",
-                           SDMMCDEVNAME(sc),
+                           DEVNAME(sc),
                            switch_group0_functions[i].name));
                }
 
                best_func = sdmmc_mem_select_transfer_mode(sc, support_func);
 
-               DPRINTF(("%s: using mode %s\n", SDMMCDEVNAME(sc),
+               DPRINTF(("%s: using mode %s\n", DEVNAME(sc),
                    switch_group0_functions[best_func].name));
        }
 
index d2ac996..e85ce16 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sdmmc_scsi.c,v 1.59 2020/10/15 13:22:13 krw Exp $     */
+/*     $OpenBSD: sdmmc_scsi.c,v 1.60 2021/03/27 14:36:28 kn Exp $      */
 
 /*
  * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -323,7 +323,7 @@ sdmmc_scsi_cmd(struct scsi_xfer *xs)
        }
 
        DPRINTF(("%s: scsi cmd target=%d opcode=%#x proc=\"%s\" (poll=%#x)\n",
-           DEVNAME(sc), link->target, xs->cmd.pcode, curproc ?
+           DEVNAME(sc), link->target, xs->cmd.opcode, curproc ?
            curproc->p_p->ps_comm : "", xs->flags & SCSI_POLL));
 
        xs->error = XS_NOERROR;