aboutsummaryrefslogtreecommitdiffstats
path: root/examples/rs232-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rs232-write.c')
-rw-r--r--examples/rs232-write.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/rs232-write.c b/examples/rs232-write.c
index 508c64a..8639c49 100644
--- a/examples/rs232-write.c
+++ b/examples/rs232-write.c
@@ -376,10 +376,7 @@ int main(void)
LOGP(DRS232TEST, LOGL_ERROR, "OOM\n");
exit(EXIT_FAILURE);
}
- kbd_ofd->fd = STDIN_FILENO;
- kbd_ofd->when = OSMO_FD_READ;
- kbd_ofd->data = NULL;
- kbd_ofd->cb = kbd_cb;
+ osmo_fd_setup(kbd_ofd, STDIN_FILENO, OSMO_FD_READ, kbd_cb, NULL, 0);
rc = osmo_fd_register(kbd_ofd);
if (rc < 0) {
LOGP(DRS232TEST, LOGL_ERROR, "FD Register\n");