dev_set_drvdata(dev, ahc);
- if (aic7xxx_detect_complete)
- error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
+ error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
return (error);
}
struct ahc_softc *ahc = dev_get_drvdata(dev);
u_long s;
+ if (ahc->platform_data && ahc->platform_data->host)
+ scsi_remove_host(ahc->platform_data->host);
+
ahc_lock(ahc, &s);
ahc_intr_enable(ahc, FALSE);
ahc_unlock(ahc, &s);