lkml.org 
[lkml]   [2004]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromDavid Brownell <>
Subject[patch 2.6.10-rc3] handle bridged platform bus segments
DateSat, 18 Dec 2004 12:11:40 -0800
There's an inappropriate assumption that platform_bus
has only one top-level segment; trivially fixed.

- Dave
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
\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2010