Re: [PATCH] PnP Fixes for 2.6.5

From: Adam Belay
Date: Wed Apr 14 2004 - 15:59:11 EST


diff -Nru a/drivers/pnp/manager.c b/drivers/pnp/manager.c
--- a/drivers/pnp/manager.c Wed Apr 14 04:41:52 2004
+++ b/drivers/pnp/manager.c Wed Apr 14 04:41:52 2004
@@ -452,23 +452,19 @@

if (!dev->dependent) {
if (pnp_assign_resources(dev, 0))
- return 1;
- else
return 0;
+ } else {
+ dep = dev->dependent;
+ do {
+ if (pnp_assign_resources(dev, i))
+ return 0;
+ dep = dep->next;
+ i++;
+ } while (dep);
}

- dep = dev->dependent;
- do {
- if (pnp_assign_resources(dev, i))
- return 1;
-
- /* if this dependent resource failed, try the next one */
- dep = dep->next;
- i++;
- } while (dep);
-
pnp_err("Unable to assign resources to device %s.", dev->dev.bus_id);
- return 0;
+ return -EBUSY;
}

/**
@@ -486,7 +482,7 @@
}

/* ensure resources are allocated */
- if (!pnp_auto_config_dev(dev))
+ if (pnp_auto_config_dev(dev))
return -EBUSY;

if (!pnp_can_write(dev)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/