All of lore.kernel.org
 help / color / mirror / Atom feed
* overlapping resources for platform devices?
@ 2005-11-15 23:31 Kumar Gala
  2005-11-16  6:41 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2005-11-15 23:31 UTC (permalink / raw)
  To: Russell King, Greg KH; +Cc: linux-kernel

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);



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-23 22:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15 23:31 overlapping resources for platform devices? Kumar Gala
2005-11-16  6:41 ` Greg KH
2005-11-17 15:36   ` Kumar Gala
2005-11-17 15:49     ` Russell King
2005-11-23  6:57       ` Kumar Gala
2005-11-23 11:52         ` Russell King
2005-11-23 18:48           ` Kumar Gala
2005-11-23 22:30             ` Russell King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.