examples: simplify find_line_by_name
authorKent Gibson <warthog618@gmail.com>
Thu, 27 Jul 2023 21:10:56 +0000 (05:10 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 28 Jul 2023 14:59:06 +0000 (16:59 +0200)
commitdae1bc711fa644b1439e2036d773a990936ed610
treef973c3d922c4cd644e476bc2ba269d7370013acb
parentd12ce74a91037471126dc50aa0b365f5753b0b17
examples: simplify find_line_by_name

Simplify the find_line_by_name example by using
gpiod_chip_get_line_offset_from_name() rather than iterating over each
line in a chip.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
examples/find_line_by_name.c