diff options
| -rw-r--r-- | driver-core/driver-core-simplify-platform_get_resource.patch | 44 | ||||
| -rw-r--r-- | series | 2 | ||||
| -rw-r--r-- | usb.current/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch | 60 | ||||
| -rw-r--r-- | usb/usb-fix-wrong-order-of-events-in-usb-serial-suspension.patch | 2 | ||||
| -rw-r--r-- | usb/usb-usb-serial-remove-unused-variables.patch | 4 | ||||
| -rw-r--r-- | version | 2 |
6 files changed, 4 insertions, 110 deletions
diff --git a/driver-core/driver-core-simplify-platform_get_resource.patch b/driver-core/driver-core-simplify-platform_get_resource.patch deleted file mode 100644 index 2c50c3706832c1..00000000000000 --- a/driver-core/driver-core-simplify-platform_get_resource.patch +++ /dev/null @@ -1,44 +0,0 @@ -From vapier@gentoo.org Mon Jul 27 14:14:14 2009 -From: Mike Frysinger <vapier@gentoo.org> -Date: Mon, 27 Jul 2009 14:20:56 -0400 -Subject: driver core: simplify platform_get_resource() -To: Greg Kroah-Hartman <gregkh@suse.de> -Cc: linux-kernel@vger.kernel.org -Message-ID: <1248718856-22287-1-git-send-email-vapier@gentoo.org> - - -The platform_get_resource() function takes a number for the desired index -into the resource array, but then does a for loop on the array to get to -that index. Considering the array is linear, the loop overhead is just -that -- overhead. So unless I missed something, convert it into an index -check and access the desired resource directly. Resulting code makes a -lot more sense considering its purpose. - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/platform.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - ---- a/drivers/base/platform.c -+++ b/drivers/base/platform.c -@@ -37,14 +37,12 @@ EXPORT_SYMBOL_GPL(platform_bus); - struct resource *platform_get_resource(struct platform_device *dev, - unsigned int type, unsigned int num) - { -- int i; -- -- for (i = 0; i < dev->num_resources; i++) { -- struct resource *r = &dev->resource[i]; -- -- if (type == resource_type(r) && num-- == 0) -+ if (num >= 0 && num < dev->num_resources) { -+ struct resource *r = &dev->resource[num]; -+ if (type == resource_type(r)) - return r; - } -+ - return NULL; - } - EXPORT_SYMBOL_GPL(platform_get_resource); @@ -28,7 +28,6 @@ usb.current/usb-cp210x-add-new-device-ids.patch usb.current/usb-ehci-orion-call-ehci_reset-before-ehci_halt.patch usb.current/usb-option-add-zte-device-ids-and-remove-onda-ids.patch usb.current/usb-option-add-usb-id-for-novatel-mc727-u727-usb727-refresh.patch -usb.current/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch usb.current/usb-aten-uc2324-is-really-a-moschip-7840.patch usb.current/usb-serial-option-add-zte-ac8710-usb-modem-device.patch usb.current/usb-option.c-to-support-alcatel-x060s-x200-broadband-modems.patch @@ -71,7 +70,6 @@ driver-core/driver-model-constify-attribute-groups.patch driver-core/mem_class-use-minor-as-index-instead-of-searching-the-array.patch driver-core/driver-core-move-dma-coherent.c-from-kernel-to-driver-base.patch driver-core/uio-add-generic-driver-for-pci-2.3-devices.patch -driver-core/driver-core-simplify-platform_get_resource.patch # devtmpfs diff --git a/usb.current/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch b/usb.current/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch deleted file mode 100644 index 71bff70ea2a4af..00000000000000 --- a/usb.current/usb-fix-usage-count-in-usb-serial-generic-open-regarding-autoresume.patch +++ /dev/null @@ -1,60 +0,0 @@ -From oliver@neukum.org Sat Jul 18 15:45:44 2009 -From: Oliver Neukum <oliver@neukum.org> -Date: Sat, 18 Jul 2009 15:47:17 +0200 -Subject: USB: fix usage count in usb serial generic open regarding autoresume -To: Matthew Garrett <mjg59@srcf.ucam.org>, Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>, linux-usb@vger.kernel.org -Message-ID: <200907181547.17813.oliver@neukum.org> -Content-Disposition: inline - - -The resume handler has to resubmit the reading URBs if the device is -resumed while opened. But the open() method bumps the counter before -it resumes a device. The fix is to increment the counter only after -the resumption or if no resumption is attempted. - -Signed-off-by: Oliver Neukum <oliver@neukum.org> -Tested-by: Matthew Garrett <mjg@redhat.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - - ---- - drivers/usb/serial/usb-serial.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - ---- a/drivers/usb/serial/usb-serial.c -+++ b/drivers/usb/serial/usb-serial.c -@@ -214,15 +214,13 @@ static int serial_open (struct tty_struc - goto bailout_port_put; - } - -- ++port->port.count; -- - /* set up our port structure making the tty driver - * remember our port object, and us it */ - tty->driver_data = port; - tty_port_tty_set(&port->port, tty); - - /* If the console is attached, the device is already open */ -- if (port->port.count == 1 && !port->console) { -+ if (!port->port.count && !port->console) { - - /* lock this module before we call it - * this may fail, which means we must bail out, -@@ -240,12 +238,16 @@ static int serial_open (struct tty_struc - if (retval) - goto bailout_module_put; - -+ ++port->port.count; -+ - /* only call the device specific open if this - * is the first time the port is opened */ - retval = serial->type->open(tty, port, filp); - if (retval) - goto bailout_interface_put; - mutex_unlock(&serial->disc_mutex); -+ } else { -+ ++port->port.count; - } - mutex_unlock(&port->mutex); - /* Now do the correct tty layer semantics */ diff --git a/usb/usb-fix-wrong-order-of-events-in-usb-serial-suspension.patch b/usb/usb-fix-wrong-order-of-events-in-usb-serial-suspension.patch index 029704f890e2d5..e68706c0c20620 100644 --- a/usb/usb-fix-wrong-order-of-events-in-usb-serial-suspension.patch +++ b/usb/usb-fix-wrong-order-of-events-in-usb-serial-suspension.patch @@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c -@@ -1191,15 +1191,19 @@ int usb_serial_suspend(struct usb_interf +@@ -1198,15 +1198,19 @@ int usb_serial_suspend(struct usb_interf serial->suspending = 1; diff --git a/usb/usb-usb-serial-remove-unused-variables.patch b/usb/usb-usb-serial-remove-unused-variables.patch index 02ed22a068babb..bbfc225db4e323 100644 --- a/usb/usb-usb-serial-remove-unused-variables.patch +++ b/usb/usb-usb-serial-remove-unused-variables.patch @@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c -@@ -284,8 +284,6 @@ bailout_serial_put: +@@ -292,8 +292,6 @@ bailout_serial_put: static void serial_do_down(struct usb_serial_port *port) { struct usb_serial_driver *drv = port->serial->type; @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* The console is magical, do not hang up the console hardware or there will be tears */ -@@ -293,12 +291,8 @@ static void serial_do_down(struct usb_se +@@ -301,12 +299,8 @@ static void serial_do_down(struct usb_se return; mutex_lock(&port->mutex); @@ -1 +1 @@ -2.6.31-rc4 +2.6.31-rc4-git2 |
