mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [patch 2.6.10-rc3] handle bridged platform bus segments
Date: Sat, 18 Dec 2004 12:11:40 -0800	[thread overview]
Message-ID: <200412181211.41018.david-b@pacbell.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 111 bytes --]

There's an inappropriate assumption that platform_bus
has only one top-level segment; trivially fixed.

- Dave

[-- Attachment #2: platform.patch --]
[-- Type: text/x-diff, Size: 1075 bytes --]

During setup to access platform bus segments through bridges, the current
platform_device_register() ignores the resource parent specified by the
bridge.  That means it'll always detect a (false) resource conflict with
the bridge, and fail the resource reservation step.

This patch makes that code use the specified parent resource, defaulting
to "iomem_resource" or "ioport_resource" only for a NULL parent (that is,
for devices that aren't accessed through a bridge).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

--- 1.23/drivers/base/platform.c	2004-09-24 11:46:18 -07:00
+++ edited/drivers/base/platform.c	2004-12-18 11:38:35 -08:00
@@ -105,11 +105,13 @@
 
 		r->name = pdev->dev.bus_id;
 
-		p = NULL;
-		if (r->flags & IORESOURCE_MEM)
-			p = &iomem_resource;
-		else if (r->flags & IORESOURCE_IO)
-			p = &ioport_resource;
+		p = r->parent;
+		if (!p) {
+			if (r->flags & IORESOURCE_MEM)
+				p = &iomem_resource;
+			else if (r->flags & IORESOURCE_IO)
+				p = &ioport_resource;
+		}
 
 		if (p && request_resource(p, r)) {
 			printk(KERN_ERR

                 reply	other threads:[~2004-12-18 20:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200412181211.41018.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --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

Powered by JetHome