diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-06-26 20:42:58 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-06-26 20:42:58 +0000 |
commit | c5552ad03973839d83d32d7108f20c00f192633b (patch) | |
tree | de32e4def600e56134cd085a7447cb6620542078 /target/linux/generic-2.6/patches-2.6.25/964-backport_gpiolib_fix_off_by_one_errors.patch | |
parent | 7ec88f88f4c65a22b3b7e32ef87cb42dcb32a6fb (diff) |
rename target/linux/generic-2.6 to generic
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21952 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.25/964-backport_gpiolib_fix_off_by_one_errors.patch')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.25/964-backport_gpiolib_fix_off_by_one_errors.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.25/964-backport_gpiolib_fix_off_by_one_errors.patch b/target/linux/generic-2.6/patches-2.6.25/964-backport_gpiolib_fix_off_by_one_errors.patch deleted file mode 100644 index c875a0d4c..000000000 --- a/target/linux/generic-2.6/patches-2.6.25/964-backport_gpiolib_fix_off_by_one_errors.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Trent Piepho <xyzzy@speakeasy.org> -Date: Fri, 23 May 2008 20:04:44 +0000 (-0700) -Subject: gpiolib: fix off by one errors -X-Git-Tag: v2.6.26-rc4~31 -X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=bff5fda972dc23bd1806a47c2098ae173585d013 - -gpiolib: fix off by one errors - -The last gpio belonging to a chip is chip->base + chip->ngpios - 1. Some -places in the code, but not all, forgot the critical minus one. - -Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> -Acked-by: David Brownell <dbrownell@users.sourceforge.net> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- - ---- a/drivers/gpio/gpiolib.c -+++ b/drivers/gpio/gpiolib.c -@@ -127,7 +127,7 @@ int __init gpiochip_reserve(int start, i - unsigned long flags; - int i; - -- if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio)) -+ if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio - 1)) - return -EINVAL; - - spin_lock_irqsave(&gpio_lock, flags); -@@ -170,7 +170,7 @@ int gpiochip_add(struct gpio_chip *chip) - unsigned id; - int base = chip->base; - -- if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio)) -+ if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio - 1)) - && base >= 0) { - status = -EINVAL; - goto fail; -@@ -207,7 +207,7 @@ fail: - /* failures here can mean systems won't boot... */ - if (status) - pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", -- chip->base, chip->base + chip->ngpio, -+ chip->base, chip->base + chip->ngpio - 1, - chip->label ? : "generic"); - return status; - } |