From 91bbda5f1f9bac99c2fc05d15b4e8499326e32c1 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 8 Nov 1999 07:56:10 +0000 Subject: [PATCH] Call id_drvinit() from attach, not probe as the OS hasn't necessarily decided which driver to use until attach. Use DRIVER_MODULE(). --- sys/dev/ida/ida_disk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index bca8abf19a3d..294b85b9afcc 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -272,7 +272,6 @@ static int idprobe(device_t dev) { - id_drvinit(); device_set_desc(dev, "Compaq Logical Drive"); return (0); } @@ -285,6 +284,7 @@ idattach(device_t dev) device_t parent; int error; + id_drvinit(); drv = (struct id_softc *)device_get_softc(dev); parent = device_get_parent(dev); drv->controller = (struct ida_softc *)device_get_softc(parent); @@ -317,4 +317,4 @@ idattach(device_t dev) return (0); } -DEV_DRIVER_MODULE(id, ida, id_driver, id_devclass, id_cdevsw, 0, 0); +DRIVER_MODULE(id, ida, id_driver, id_devclass, 0, 0);