gpiolib: fix unwatch ioctl()

Fix the field having a bit cleared by the unwatch ioctl().

Fixes: 51c1064e82 ("gpiolib: add new ioctl() for monitoring changes in line info")
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Kent Gibson 2020-02-24 14:49:53 +00:00 committed by Bartosz Golaszewski
parent df2cd58976
commit 48543bd8e9

View File

@ -1276,7 +1276,7 @@ static long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (IS_ERR(desc))
return PTR_ERR(desc);
clear_bit(desc_to_gpio(desc), &desc->flags);
clear_bit(desc_to_gpio(desc), priv->watched_lines);
return 0;
}
return -EINVAL;