Shorten the name of the line lookup routine as any other type of
lookup wouldn't make sense anyway.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
* If this routine succeeds, the user must manually close the GPIO chip owning
* this line to avoid memory leaks.
*/
-struct gpiod_line * gpiod_line_find_by_name(const char *name) GPIOD_API;
+struct gpiod_line * gpiod_line_find(const char *name) GPIOD_API;
/**
* @brief Close a GPIO chip owning this line and release all resources.
return 0;
}
-struct gpiod_line * gpiod_line_find_by_name(const char *name)
+struct gpiod_line * gpiod_line_find(const char *name)
{
struct gpiod_chip_iter *chip_iter;
struct gpiod_line_iter line_iter;
if (argc != 1)
die("exactly one GPIO line name must be specified");
- line = gpiod_line_find_by_name(argv[0]);
+ line = gpiod_line_find(argv[0]);
if (!line)
return EXIT_FAILURE;
{
TEST_CLEANUP(test_line_close_chip) struct gpiod_line *line = NULL;
- line = gpiod_line_find_by_name("gpio-mockup-C-12");
+ line = gpiod_line_find("gpio-mockup-C-12");
TEST_ASSERT_NOT_NULL(line);
TEST_ASSERT_EQ(gpiod_line_offset(line), 12);