diff options
| author | Warner Losh <imp@FreeBSD.org> | 2022-04-05 00:03:54 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2022-04-05 04:29:28 +0000 |
| commit | 05d3c5fd182eeb33075ee14e2802c94882dc2c41 (patch) | |
| tree | 6d420781665849287e42be697b1b2202489c5151 /sys/dev/fdc | |
| parent | 9a2e6ca6ef82128ed2b7b9c7e8e3a9a6c459fb45 (diff) | |
Diffstat (limited to 'sys/dev/fdc')
| -rw-r--r-- | sys/dev/fdc/fdc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index b427e919add1..5c78d02a5502 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1887,7 +1887,9 @@ fdc_print_child(device_t me, device_t child) static int fd_probe(device_t dev) { +#if defined(__i386__) || defined(__amd64__) int unit; +#endif int i; u_int st0, st3; struct fd_data *fd; @@ -1903,7 +1905,6 @@ fd_probe(device_t dev) fd->dev = dev; fd->fdc = fdc; fd->fdsu = fdsu; - unit = device_get_unit(dev); /* Auto-probe if fdinfo is present, but always allow override. */ type = flags & FD_TYPEMASK; @@ -1917,6 +1918,7 @@ fd_probe(device_t dev) } #if defined(__i386__) || defined(__amd64__) + unit = device_get_unit(dev); if (fd->type == FDT_NONE && (unit == 0 || unit == 1)) { /* Look up what the BIOS thinks we have. */ if (unit == 0) |
