mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 2.6.10-rc3] handle bridged platform bus segments
@ 2004-12-18 20:11 David Brownell
  0 siblings, 0 replies; only message in thread
From: David Brownell @ 2004-12-18 20:11 UTC (permalink / raw)
  To: Linux Kernel list

[-- 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-12-18 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-18 20:11 [patch 2.6.10-rc3] handle bridged platform bus segments David Brownell

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