Commit d2e2586
Bartosz Golaszewski
gpio: cdev: wake up chardev poll() on device unbind
Add a notifier block to the gpio_chardev_data structure and register it
with the gpio_device's device notifier. Upon reception of an event, wake
up the wait queue so that the user-space be forced out of poll() and need
to go into a new system call which will then fail due to the chip being
gone.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Kent Gibson <warthog618@gmail.com>1 parent a067419 commit d2e2586
1 file changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2320 | 2320 | | |
2321 | 2321 | | |
2322 | 2322 | | |
| 2323 | + | |
2323 | 2324 | | |
2324 | 2325 | | |
2325 | 2326 | | |
| |||
2517 | 2518 | | |
2518 | 2519 | | |
2519 | 2520 | | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
2520 | 2533 | | |
2521 | 2534 | | |
2522 | 2535 | | |
| |||
2671 | 2684 | | |
2672 | 2685 | | |
2673 | 2686 | | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
2674 | 2694 | | |
2675 | 2695 | | |
2676 | 2696 | | |
2677 | 2697 | | |
2678 | | - | |
| 2698 | + | |
2679 | 2699 | | |
2680 | 2700 | | |
2681 | 2701 | | |
2682 | 2702 | | |
2683 | 2703 | | |
2684 | | - | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
2685 | 2708 | | |
2686 | 2709 | | |
2687 | 2710 | | |
| |||
2706 | 2729 | | |
2707 | 2730 | | |
2708 | 2731 | | |
| 2732 | + | |
| 2733 | + | |
2709 | 2734 | | |
2710 | 2735 | | |
2711 | 2736 | | |
| |||
0 commit comments