public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Belay <ambx1@neo.rr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PnP Fixes for 2.6.5
Date: Wed, 14 Apr 2004 04:56:22 +0000	[thread overview]
Message-ID: <20040414045622.GC12732@neo.rr.com> (raw)
In-Reply-To: <20040414045552.GB12732@neo.rr.com>

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)) {

  reply	other threads:[~2004-04-14 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-14  4:55 [PATCH] PnP Fixes for 2.6.5 Adam Belay
2004-04-14  4:56 ` Adam Belay [this message]
2004-04-14  4:56   ` Adam Belay
2004-04-14  4:57     ` Adam Belay
2004-04-14  4:57       ` Adam Belay
2004-04-14  4:58         ` Adam Belay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040414045622.GC12732@neo.rr.com \
    --to=ambx1@neo.rr.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox