]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: mockup: fix debugfs read
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 22 Mar 2019 17:27:12 +0000 (18:27 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 27 Mar 2019 08:56:01 +0000 (09:56 +0100)
commit8f27a97706b8956ac486a533755e46134dd779e7
treedcafb0c6f74db205d336c9b9c10e0ff37c687666
parentaebb604a93c22b22e81c6f148a64e38e501b7420
gpio: mockup: fix debugfs read

The debugfs read callback must advance ppos or users using read() on
the file descriptor will never get the EOL. This wasn't spotted before
as I was using busybox cat for testing which uses sendfile() internally
and only noticed it now when switched to cat from coreutils.

Fixes: 4ed6199559fe ("gpio: mockup: rework debugfs interface")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-mockup.c