Add a new cleanup function which calls gpiod_line_close_chip().
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
gpiod_chip_close(*chip);
}
+void test_line_close_chip(struct gpiod_line **line)
+{
+ if (*line)
+ gpiod_line_close_chip(*line);
+}
+
void test_free_str(char **str)
{
if (*str)
* The functions below can be reused by different tests for common use cases.
*/
void test_close_chip(struct gpiod_chip **chip);
+void test_line_close_chip(struct gpiod_line **line);
void test_free_str(char **str);
void test_free_chip_iter(struct gpiod_chip_iter **iter);
void test_free_chip_iter_noclose(struct gpiod_chip_iter **iter);