From 3d459b4aed8f8dd70f0e56424218376c15e5be81 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 8 Nov 1999 07:56:10 +0000 Subject: 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(-) (limited to 'sys/dev/ida') diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index bca8abf..294b85b 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); -- cgit v1.1