diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-22 20:13:25 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-22 20:13:25 +0300 |
commit | 144b5ae3e343f193a6a7edef8f30aab4fad2d12b (patch) | |
tree | 0801e8b3a6d396a26d3e9ec2ee6720ba22e3ea87 /drivers/gpio/gpio-104-idi-48.c | |
parent | 67016f6cdfd079e632bbc49e33178b2d558c120a (diff) | |
parent | bfbbe44daf64d0ccf2de123179817f3557fb9237 (diff) | |
download | linux-144b5ae3e343f193a6a7edef8f30aab4fad2d12b.tar.xz |
Merge tag 'gpio-v4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fixes from Linus Walleij:
"More GPIO fixes. Most prominent the gpiod_to_irq() fix brought to my
attention by Hans de Goede. The hardening patch is a consequence of
the reasoning around that bug.
- It was discovered that too many parts of the kernel does not
respect gpiod_to_irq() returning zero for an invalid IRQ. While
this gets fixed, we need to make it return negative errorcodes
again.
- Harden the library a bit when passed error pointers. It is a bug
to use these, but let's be helpful and warn the users.
- Fix an uninitialized spinlock in the 104-idi-48 driver"
* tag 'gpio-v4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
gpio: make library immune to error pointers
gpio: make sure gpiod_to_irq() returns negative on NULL desc
gpio: 104-idi-48: Fix missing spin_lock_init for ack_lock
Diffstat (limited to 'drivers/gpio/gpio-104-idi-48.c')
-rw-r--r-- | drivers/gpio/gpio-104-idi-48.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-104-idi-48.c b/drivers/gpio/gpio-104-idi-48.c index 6c75c83baf5a..2d2763ea1a68 100644 --- a/drivers/gpio/gpio-104-idi-48.c +++ b/drivers/gpio/gpio-104-idi-48.c @@ -247,6 +247,7 @@ static int idi_48_probe(struct device *dev, unsigned int id) idi48gpio->irq = irq[id]; spin_lock_init(&idi48gpio->lock); + spin_lock_init(&idi48gpio->ack_lock); dev_set_drvdata(dev, idi48gpio); |