summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/fdc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pc98/cbus/fdc.c')
-rw-r--r--sys/pc98/cbus/fdc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index c72c41e..e1f2923 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -1042,6 +1042,7 @@ fdc_attach(device_t dev)
{
struct fdc_data *fdc;
int i, error;
+ const char *name;
fdc = device_get_softc(dev);
error = fdc_alloc_resources(fdc);
@@ -1079,9 +1080,9 @@ fdc_attach(device_t dev)
* Probe and attach any children. We should probably detect
* devices from the BIOS unless overridden.
*/
- for (i = resource_query_string(-1, "at", device_get_nameunit(dev));
- i != -1;
- i = resource_query_string(i, "at", device_get_nameunit(dev)))
+ name = device_get_nameunit(dev);
+ i = -1;
+ while ((i = resource_query_string(i, "at", name)) != -1)
fdc_add_child(dev, resource_query_name(i),
resource_query_unit(i));
OpenPOWER on IntegriCloud