overlapping resources for platform devices?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guys,

I was wondering if there was any issue in changing platform_device_add to
use insert_resource instead of request_resource.  The reason for this
change is to handle several cases where we have device registers that
overlap that two different drivers are handling.

The biggest case of this is with ethernet on a number of PowerPC based 
systems where a subset of the ethernet controllers registers are used for 
MDIO/PHY bus control.  We currently hack around the limitation by having 
the MDIO/PHY bus not actually register an memory resource region.

If the following looks good I'll send a more formal patch.

-- kumar

--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -257,7 +257,7 @@ int platform_device_add(struct platform_
                                p = &ioport_resource;
                }
 
-               if (p && request_resource(p, r)) {
+               if (p && insert_resource(p, r)) {
                        printk(KERN_ERR
                               "%s: failed to claim resource %d\n",
                               pdev->dev.bus_id, i);


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux