Documentation: gpio: legacy: Don't use POLLERR for poll(2)
diff mbox series

Message ID 20190215081736.7291-1-u.kleine-koenig@pengutronix.de
State New
Headers show
Series
  • Documentation: gpio: legacy: Don't use POLLERR for poll(2)
Related show

Commit Message

Uwe Kleine-König Feb. 15, 2019, 8:17 a.m. UTC
According to the manpage of poll(2) and also looking at the respective
syscall providing POLLERR in .events is a no-op. So don't recommend
using it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Documentation/driver-api/gpio/legacy.rst | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Bartosz Golaszewski Feb. 15, 2019, 8:55 a.m. UTC | #1
pt., 15 lut 2019 o 09:17 Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> napisał(a):
>
> According to the manpage of poll(2) and also looking at the respective
> syscall providing POLLERR in .events is a no-op. So don't recommend
> using it.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  Documentation/driver-api/gpio/legacy.rst | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/driver-api/gpio/legacy.rst b/Documentation/driver-api/gpio/legacy.rst
> index 5e9421e05f1d..9bc34ba697d9 100644
> --- a/Documentation/driver-api/gpio/legacy.rst
> +++ b/Documentation/driver-api/gpio/legacy.rst
> @@ -690,11 +690,10 @@ and have the following read/write attributes:
>                 and if it has been configured to generate interrupts (see the
>                 description of "edge"), you can poll(2) on that file and
>                 poll(2) will return whenever the interrupt was triggered. If
> -               you use poll(2), set the events POLLPRI and POLLERR. If you
> -               use select(2), set the file descriptor in exceptfds. After
> -               poll(2) returns, either lseek(2) to the beginning of the sysfs
> -               file and read the new value or close the file and re-open it
> -               to read the value.
> +               you use poll(2), set the events POLLPRI. If you use select(2),
> +               set the file descriptor in exceptfds. After poll(2) returns,
> +               either lseek(2) to the beginning of the sysfs file and read the
> +               new value or close the file and re-open it to read the value.
>
>         "edge" ... reads as either "none", "rising", "falling", or
>                 "both". Write these strings to select the signal edge(s)
> --
> 2.20.1
>

Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Linus Walleij Feb. 20, 2019, 9:54 a.m. UTC | #2
On Fri, Feb 15, 2019 at 9:17 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> According to the manpage of poll(2) and also looking at the respective
> syscall providing POLLERR in .events is a no-op. So don't recommend
> using it.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Patch applied with Bartosz review tag.

Yours,
Linus Walleij

Patch
diff mbox series

diff --git a/Documentation/driver-api/gpio/legacy.rst b/Documentation/driver-api/gpio/legacy.rst
index 5e9421e05f1d..9bc34ba697d9 100644
--- a/Documentation/driver-api/gpio/legacy.rst
+++ b/Documentation/driver-api/gpio/legacy.rst
@@ -690,11 +690,10 @@  and have the following read/write attributes:
 		and if it has been configured to generate interrupts (see the
 		description of "edge"), you can poll(2) on that file and
 		poll(2) will return whenever the interrupt was triggered. If
-		you use poll(2), set the events POLLPRI and POLLERR. If you
-		use select(2), set the file descriptor in exceptfds. After
-		poll(2) returns, either lseek(2) to the beginning of the sysfs
-		file and read the new value or close the file and re-open it
-		to read the value.
+		you use poll(2), set the events POLLPRI. If you use select(2),
+		set the file descriptor in exceptfds. After poll(2) returns,
+		either lseek(2) to the beginning of the sysfs file and read the
+		new value or close the file and re-open it to read the value.
 
 	"edge" ... reads as either "none", "rising", "falling", or
 		"both". Write these strings to select the signal edge(s)