projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[orion] update to 2.6.28 final
[openwrt.git]
/
target
/
linux
/
generic-2.6
/
patches-2.6.25
/
961-backport_gpio_define_gpio_valid.patch
diff --git
a/target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch
b/target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch
index
2e826d4
..
771b743
100644
(file)
--- a/
target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch
+++ b/
target/linux/generic-2.6/patches-2.6.25/961-backport_gpio_define_gpio_valid.patch
@@
-16,11
+16,9
@@
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
-diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
-index 5463009..c35ca9e 100644
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
--- a/Documentation/gpio.txt
+++ b/Documentation/gpio.txt
-@@ -107,6 +107,16 @@ type of GPIO controller, and on one part
icular board 80-95 with an FPGA.
+@@ -107,6 +107,16 @@ type of GPIO controller, and on one part
The numbers need not be contiguous; either of those platforms could also
use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders.
The numbers need not be contiguous; either of those platforms could also
use numbers 2000-2063 to identify GPIOs in a bank of I2C GPIO expanders.
@@
-37,8
+35,6
@@
index 5463009..c35ca9e 100644
Whether a platform supports multiple GPIO controllers is currently a
platform-specific implementation issue.
Whether a platform supports multiple GPIO controllers is currently a
platform-specific implementation issue.
-diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
-index eb75d12..623fcd9 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -99,7 +99,7 @@ int gpiochip_add(struct gpio_chip *chip)
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -99,7 +99,7 @@ int gpiochip_add(struct gpio_chip *chip)
@@
-50,7
+46,7
@@
index eb75d12..623fcd9 100644
status = -EINVAL;
goto fail;
}
status = -EINVAL;
goto fail;
}
-@@ -174,7 +174,7 @@ int gpio_request(unsigned gpio, const ch
ar *label)
+@@ -174,7 +174,7 @@ int gpio_request(unsigned gpio, const ch
spin_lock_irqsave(&gpio_lock, flags);
spin_lock_irqsave(&gpio_lock, flags);
@@
-68,7
+64,7
@@
index eb75d12..623fcd9 100644
WARN_ON(extra_checks);
return;
}
WARN_ON(extra_checks);
return;
}
-@@ -245,7 +245,7 @@ const char *gpiochip_is_requested(struct
gpio_chip *chip, unsigned offset)
+@@ -245,7 +245,7 @@ const char *gpiochip_is_requested(struct
{
unsigned gpio = chip->base + offset;
{
unsigned gpio = chip->base + offset;
@@
-86,7
+82,7
@@
index eb75d12..623fcd9 100644
goto fail;
chip = desc->chip;
if (!chip || !chip->get || !chip->direction_input)
goto fail;
chip = desc->chip;
if (!chip || !chip->get || !chip->direction_input)
-@@ -314,7 +314,7 @@ int gpio_direction_output(unsigned gpio,
int value)
+@@ -314,7 +314,7 @@ int gpio_direction_output(unsigned gpio,
spin_lock_irqsave(&gpio_lock, flags);
spin_lock_irqsave(&gpio_lock, flags);
@@
-95,7
+91,7
@@
index eb75d12..623fcd9 100644
goto fail;
chip = desc->chip;
if (!chip || !chip->set || !chip->direction_output)
goto fail;
chip = desc->chip;
if (!chip || !chip->set || !chip->direction_output)
-@@ -531,7 +531,7 @@ static int gpiolib_show(struct seq_file
*s, void *unused)
+@@ -531,7 +531,7 @@ static int gpiolib_show(struct seq_file
/* REVISIT this isn't locked against gpio_chip removal ... */
/* REVISIT this isn't locked against gpio_chip removal ... */
@@
-104,8
+100,6
@@
index eb75d12..623fcd9 100644
if (chip == gpio_desc[gpio].chip)
continue;
chip = gpio_desc[gpio].chip;
if (chip == gpio_desc[gpio].chip)
continue;
chip = gpio_desc[gpio].chip;
-diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
-index 7e77b6f..464c5b3 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -16,6 +16,12 @@
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -16,6 +16,12 @@
@@
-121,15
+115,19
@@
index 7e77b6f..464c5b3 100644
struct seq_file;
struct module;
struct seq_file;
struct module;
-@@ -99,6 +105,1
2 @@ extern int __gpio_cansleep(unsigned gpio);
+@@ -99,6 +105,1
6 @@ extern int __gpio_cansleep(unsigned gpio
#else
#else
-+static inline int gpio_is_valid(int number)
++static inline int
__
gpio_is_valid(int number)
+{
+ /* only non-negative numbers are valid */
+ return number >= 0;
+}
+{
+ /* only non-negative numbers are valid */
+ return number >= 0;
+}
++
++#ifndef gpio_is_valid
++#define gpio_is_valid __gpio_is_valid
++#endif
+
/* platforms that don't directly support access to GPIOs through I2C, SPI,
* or other blocking infrastructure can use these wrappers.
+
/* platforms that don't directly support access to GPIOs through I2C, SPI,
* or other blocking infrastructure can use these wrappers.
This page took
0.027259 seconds
and
4
git commands to generate.