---
Index: dev/isa/fd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/isa/fd.c,v
retrieving revision 1.73
diff -u -r1.73 fd.c
--- dev/isa/fd.c 8 Mar 2007 23:23:45 -0000 1.73
+++ dev/isa/fd.c 20 Mar 2007 18:05:05 -0000
@@ -148,6 +148,7 @@
#include <machine/intr.h>
+#include <dev/isa/isareg.h>
#include <dev/isa/isavar.h>
#include <dev/isa/isadmavar.h>
@@ -350,8 +351,7 @@
* The NVRAM info only tells us about the first two disks on the
* `primary' floppy controller.
*/
- /* XXX device_unit() abuse */
- if (device_unit(&fdc->sc_dev) == 0)
+ if (iot == X86_BUS_SPACE_IO && ioh ==
(bus_space_handle_t)IO_FD1 + 2)
type = mc146818_read(NULL, NVRAM_DISKETTE); /* XXX softc */
else
type = -1;
---
Izumi Tsutsui