aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-11-29 12:04:15 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-29 12:04:15 -0800
commit731e918a4a85c611ca2b7bca552c5f4ae10d1f53 (patch)
treec39cb1442ef9a4c4f7ae8bc2459e6a7e01557343 /driver
parent5ee9d5564f1372dcf7cb6dcfa052bd7368657f40 (diff)
downloadpatches-731e918a4a85c611ca2b7bca552c5f4ae10d1f53.tar.gz
2.6.15-rc3 refresh and usb, driver core, and i2c patches
Diffstat (limited to 'driver')
-rw-r--r--driver/allow-overlapping-resources-for-platform-devices.patch35
-rw-r--r--driver/klist-fix-broken-kref-counting-in-find-functions.patch38
2 files changed, 73 insertions, 0 deletions
diff --git a/driver/allow-overlapping-resources-for-platform-devices.patch b/driver/allow-overlapping-resources-for-platform-devices.patch
new file mode 100644
index 0000000000000..e69fc04b3ed86
--- /dev/null
+++ b/driver/allow-overlapping-resources-for-platform-devices.patch
@@ -0,0 +1,35 @@
+From galak@gate.crashing.org Mon Nov 28 08:23:09 2005
+Date: Mon, 28 Nov 2005 10:15:39 -0600 (CST)
+From: Kumar Gala <galak@gate.crashing.org>
+To: Andrew Morton <akpm@osdl.org>
+cc: Russell King <rmk+lkml@arm.linux.org.uk>, Greg KH <greg@kroah.com>
+Subject: [DRIVER MODEL] Allow overlapping resources for platform devices
+Message-ID: <Pine.LNX.4.44.0511281015060.25081-100000@gate.crashing.org>
+
+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 <galak@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/platform.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/base/platform.c
++++ gregkh-2.6/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);
diff --git a/driver/klist-fix-broken-kref-counting-in-find-functions.patch b/driver/klist-fix-broken-kref-counting-in-find-functions.patch
new file mode 100644
index 0000000000000..8895fcb543899
--- /dev/null
+++ b/driver/klist-fix-broken-kref-counting-in-find-functions.patch
@@ -0,0 +1,38 @@
+From akpm@osdl.org Sat Nov 26 20:52:06 2005
+Message-Id: <200511270448.jAR4mj6g000778@shell0.pdx.osdl.net>
+From: Frank Pavlic <pavlic@de.ibm.com>
+Subject: klist: Fix broken kref counting in find functions
+Date: Sat, 26 Nov 2005 20:48:40 -0800
+
+The klist reference counting in the find functions that use
+klist_iter_init_node is broken. If the function (for example
+driver_find_device) is called with a NULL start object then everything is
+fine, the first call to next_device()/klist_next increases the ref-count of
+the first node on the list and does nothing for the start object which is
+NULL.
+
+If they are called with a valid start object then klist_next will decrement
+the ref-count for the start object but nobody has incremented it. Logical
+place to fix this would be klist_iter_init_node because the function puts a
+reference of the object into the klist_iter struct.
+
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
+Cc: Patrick Mochel <mochel@digitalimplant.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ lib/klist.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- gregkh-2.6.orig/lib/klist.c
++++ gregkh-2.6/lib/klist.c
+@@ -199,6 +199,8 @@ void klist_iter_init_node(struct klist *
+ i->i_klist = k;
+ i->i_head = &k->k_list;
+ i->i_cur = n;
++ if (n)
++ kref_get(&n->n_ref);
+ }
+
+ EXPORT_SYMBOL_GPL(klist_iter_init_node);