Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271148
b: refs/heads/master
c: 479a0c7
h: refs/heads/master
v: v3
  • Loading branch information
Linus Walleij authored and Grant Likely committed Sep 20, 2011
1 parent 33bb72d commit 51ab041
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 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: 3c0227d262a5835849c68eb8328db016caad6085
refs/heads/master: 479a0c7eee68243ad9915a9ccc217a35c4e5e0e2
11 changes: 2 additions & 9 deletions trunk/drivers/gpio/gpio-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ struct nmk_gpio_chip {
u32 rwimsc;
u32 fwimsc;
u32 slpm;
u32 enabled;
u32 pull_up;
};

Expand Down Expand Up @@ -605,11 +604,6 @@ static int nmk_gpio_irq_maskunmask(struct irq_data *d, bool enable)
if (!nmk_chip)
return -EINVAL;

if (enable)
nmk_chip->enabled |= bitmask;
else
nmk_chip->enabled &= ~bitmask;

clk_enable(nmk_chip->clk);
spin_lock_irqsave(&nmk_gpio_slpm_lock, flags);
spin_lock(&nmk_chip->lock);
Expand Down Expand Up @@ -653,7 +647,7 @@ static int nmk_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
spin_lock_irqsave(&nmk_gpio_slpm_lock, flags);
spin_lock(&nmk_chip->lock);

if (!(nmk_chip->enabled & bitmask))
if (irqd_irq_disabled(d))
__nmk_gpio_set_wake(nmk_chip, gpio, on);

if (on)
Expand All @@ -670,7 +664,7 @@ static int nmk_gpio_irq_set_wake(struct irq_data *d, unsigned int on)

static int nmk_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{
bool enabled;
bool enabled = !irqd_irq_disabled(d);
bool wake = irqd_is_wakeup_set(d);
int gpio;
struct nmk_gpio_chip *nmk_chip;
Expand All @@ -691,7 +685,6 @@ static int nmk_gpio_irq_set_type(struct irq_data *d, unsigned int type)
clk_enable(nmk_chip->clk);
spin_lock_irqsave(&nmk_chip->lock, flags);

enabled = !!(nmk_chip->enabled & bitmask);
if (enabled)
__nmk_gpio_irq_modify(nmk_chip, gpio, NORMAL, false);

Expand Down

0 comments on commit 51ab041

Please sign in to comment.