aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ppbus/ppb_msq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ppbus/ppb_msq.c')
-rw-r--r--sys/dev/ppbus/ppb_msq.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ppbus/ppb_msq.c b/sys/dev/ppbus/ppb_msq.c
index 533ab5f4603a..6b8e070eb3db 100644
--- a/sys/dev/ppbus/ppb_msq.c
+++ b/sys/dev/ppbus/ppb_msq.c
@@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
static struct ppb_xfer *
mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode)
{
- int index, epp;
+ int index, epp, mode;
struct ppb_xfer *table;
switch (opcode) {
@@ -72,7 +72,8 @@ mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode)
}
/* retrieve the device operating mode */
- switch (ppb_get_mode(bus)) {
+ mode = ppb_get_mode(bus);
+ switch (mode) {
case PPB_COMPATIBLE:
index = COMPAT_MSQ;
break;
@@ -99,7 +100,7 @@ mode2xfer(device_t bus, struct ppb_device *ppbdev, int opcode)
index = ECP_MSQ;
break;
default:
- panic("%s: unknown mode (%d)", __func__, ppbdev->mode);
+ panic("%s: unknown mode (%d)", __func__, mode);
}
return (&table[index]);