diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-03 11:22:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-03 11:22:06 -0400 |
commit | cf0223503e6198292cdcc864e01eeb5fe7490752 (patch) | |
tree | 5ed99ae5fc7a67ec19df19f4b46b0c04d97db174 /drivers/sh/intc/chip.c | |
parent | 3f8ddb032afa729d4bad1bf2965d3ec068de6b72 (diff) | |
parent | e857bfd4604a3a4edaf9c7038db880d9f78aecbd (diff) |
Merge branch 'sh-latest' of git://github.com/pmundt/linux-sh
* 'sh-latest' of git://github.com/pmundt/linux-sh:
sh: Add default uImage rule for sh7757lcr
sh: modify the asm/sh_eth.h to linux/sh_eth.h in sh7757lcr
sh: userimask.c needs linux/stat.h
sh: pfc: Add GPIO IRQ support
sh: modify the asm/sh_eth.h to linux/sh_eth.h in some boards
sh: pfc: Remove unused gpio_in_use member
sh: add parameters for EHCI and RIIC in clock-sh7757.c
sh: kexec: Add PHYSICAL_START
SH: irq: Remove IRQF_DISABLED
sh: pfc: get_config_reg() shift clean up
sh: intc: Add IRQ trigger bit field check
sh: drop unused Kconfig symbol
sh: Fix implicit declaration of function numa_node_id
sh: kexec: Register crashk_res
sh: ecovec: add renesas_usbhs DMAEngine support
Diffstat (limited to 'drivers/sh/intc/chip.c')
-rw-r--r-- | drivers/sh/intc/chip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/sh/intc/chip.c b/drivers/sh/intc/chip.c index 33b2ed451e09..e0ada3773786 100644 --- a/drivers/sh/intc/chip.c +++ b/drivers/sh/intc/chip.c | |||
@@ -202,11 +202,16 @@ static int intc_set_type(struct irq_data *data, unsigned int type) | |||
202 | if (!value) | 202 | if (!value) |
203 | return -EINVAL; | 203 | return -EINVAL; |
204 | 204 | ||
205 | value &= ~SENSE_VALID_FLAG; | ||
206 | |||
205 | ihp = intc_find_irq(d->sense, d->nr_sense, irq); | 207 | ihp = intc_find_irq(d->sense, d->nr_sense, irq); |
206 | if (ihp) { | 208 | if (ihp) { |
209 | /* PINT has 2-bit sense registers, should fail on EDGE_BOTH */ | ||
210 | if (value >= (1 << _INTC_WIDTH(ihp->handle))) | ||
211 | return -EINVAL; | ||
212 | |||
207 | addr = INTC_REG(d, _INTC_ADDR_E(ihp->handle), 0); | 213 | addr = INTC_REG(d, _INTC_ADDR_E(ihp->handle), 0); |
208 | intc_reg_fns[_INTC_FN(ihp->handle)](addr, ihp->handle, | 214 | intc_reg_fns[_INTC_FN(ihp->handle)](addr, ihp->handle, value); |
209 | value & ~SENSE_VALID_FLAG); | ||
210 | } | 215 | } |
211 | 216 | ||
212 | return 0; | 217 | return 0; |