static int fdc_cbus_probe(device_t dev) { int error; struct fdc_data *fdc; fdc = device_get_softc(dev); /* Check pnp ids */ if (isa_get_vendorid(dev)) return (ENXIO); /* Attempt to allocate our resources for the duration of the probe */ error = fdc_cbus_alloc_resources(dev, fdc); if (!error) error = fdc_initial_reset(fdc); fdc_release_resources(fdc); return (error); }
static int fdc_isa_probe(device_t dev) { int error; struct fdc_data *fdc; fdc = device_get_softc(dev); fdc->fdc_dev = dev; /* Check pnp ids */ error = ISA_PNP_PROBE(device_get_parent(dev), dev, fdc_ids); if (error == ENXIO) return (ENXIO); /* Attempt to allocate our resources for the duration of the probe */ error = fdc_isa_alloc_resources(dev, fdc); if (error == 0) error = fdc_initial_reset(dev, fdc); fdc_release_resources(fdc); return (error); }