Re: [PATCH] USB and Driver Core patches for 2.6.10

From: Greg KH (greg_at_kroah.com)
Date: 01/08/05

  • Next message: Greg KH: "Re: [PATCH] USB and Driver Core patches for 2.6.10"
    Date:	Fri, 7 Jan 2005 21:47:37 -0800
    To: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
    
    

    ChangeSet 1.1938.439.49, 2005/01/06 17:28:25-08:00, david-b@pacbell.net

    [PATCH] Driver Core: handle bridged platform bus segments

    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>
    Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

     drivers/base/platform.c | 12 +++++++-----
     1 files changed, 7 insertions(+), 5 deletions(-)

    diff -Nru a/drivers/base/platform.c b/drivers/base/platform.c
    --- a/drivers/base/platform.c 2005-01-07 15:38:05 -08:00
    +++ b/drivers/base/platform.c 2005-01-07 15:38:05 -08:00
    @@ -141,11 +141,13 @@
                     if (r->name == NULL)
                             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

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


  • Next message: Greg KH: "Re: [PATCH] USB and Driver Core patches for 2.6.10"

    Relevant Pages


    Loading