aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/langwell_gpio.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/gpio/langwell_gpio.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/gpio/langwell_gpio.c')
-rw-r--r--drivers/gpio/langwell_gpio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c
index 4baf3d7d0f8e..00c3a14127af 100644
--- a/drivers/gpio/langwell_gpio.c
+++ b/drivers/gpio/langwell_gpio.c
@@ -29,6 +29,7 @@
29#include <linux/irq.h> 29#include <linux/irq.h>
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/slab.h>
32 33
33struct lnw_gpio_register { 34struct lnw_gpio_register {
34 u32 GPLR[2]; 35 u32 GPLR[2];
@@ -123,7 +124,7 @@ static int lnw_irq_type(unsigned irq, unsigned type)
123 void __iomem *grer = (void __iomem *)(&lnw->reg_base->GRER[reg]); 124 void __iomem *grer = (void __iomem *)(&lnw->reg_base->GRER[reg]);
124 void __iomem *gfer = (void __iomem *)(&lnw->reg_base->GFER[reg]); 125 void __iomem *gfer = (void __iomem *)(&lnw->reg_base->GFER[reg]);
125 126
126 if (gpio < 0 || gpio > lnw->chip.ngpio) 127 if (gpio >= lnw->chip.ngpio)
127 return -EINVAL; 128 return -EINVAL;
128 spin_lock_irqsave(&lnw->lock, flags); 129 spin_lock_irqsave(&lnw->lock, flags);
129 if (type & IRQ_TYPE_EDGE_RISING) 130 if (type & IRQ_TYPE_EDGE_RISING)