Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137094
b: refs/heads/master
c: e1312bf
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Bryan Wu committed Mar 28, 2009
1 parent 791da8e commit 1af3fc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a66648756f97ea5150875b85a0177c33e41afc1d
refs/heads/master: e1312bfcc25f9301f997bf1ce84355a0f1167847
5 changes: 4 additions & 1 deletion trunk/arch/blackfin/include/asm/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ static inline void gpio_set_value(unsigned gpio, int value)

static inline int gpio_to_irq(unsigned gpio)
{
return (gpio + GPIO_IRQ_BASE);
if (likely(gpio < MAX_BLACKFIN_GPIOS))
return gpio + GPIO_IRQ_BASE;

return -EINVAL;
}

static inline int irq_to_gpio(unsigned irq)
Expand Down

0 comments on commit 1af3fc3

Please sign in to comment.