Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273352
b: refs/heads/master
c: 52e3124
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 28, 2011
1 parent 694a807 commit 2935b30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: a136d3d85f2dec52df077a1d8c9728f8835ce532
refs/heads/master: 52e3124f248e9ada990cd2aeafe250a53713c6f0
9 changes: 7 additions & 2 deletions trunk/drivers/sh/intc/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,16 @@ static int intc_set_type(struct irq_data *data, unsigned int type)
if (!value)
return -EINVAL;

value &= ~SENSE_VALID_FLAG;

ihp = intc_find_irq(d->sense, d->nr_sense, irq);
if (ihp) {
/* PINT has 2-bit sense registers, should fail on EDGE_BOTH */
if (value >= (1 << _INTC_WIDTH(ihp->handle)))
return -EINVAL;

addr = INTC_REG(d, _INTC_ADDR_E(ihp->handle), 0);
intc_reg_fns[_INTC_FN(ihp->handle)](addr, ihp->handle,
value & ~SENSE_VALID_FLAG);
intc_reg_fns[_INTC_FN(ihp->handle)](addr, ihp->handle, value);
}

return 0;
Expand Down

0 comments on commit 2935b30

Please sign in to comment.