From: Kumar Gala Date: Mon, 28 Nov 2005 16:15:39 +0000 (-0600) Subject: [PATCH] Allow overlapping resources for platform devices X-Git-Tag: v2.6.16-rc1~474^2~22^2^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d960bb4db9f422b5c3c82e0dfd6c8213a4fc430d;p=linux-2.6-omap-h63xx.git [PATCH] Allow overlapping resources for platform devices There are cases in which a device's memory mapped registers overlap with another device's memory mapped registers. On several PowerPC devices this occurs for the MDIO bus, whose registers tended to overlap with one of the ethernet controllers. By switching from request_resource to insert_resource we can register the MDIO bus as a proper platform device and not hack around how we handle its memory mapped registers. Signed-off-by: Kumar Gala Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 8827dafba94..1091af1cbb5 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -257,7 +257,7 @@ int platform_device_add(struct platform_device *pdev) 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);