Message ID | 20221127083809.29351-1-leon@georgemail.eu |
---|---|
State | New |
Headers | show |
Series | fix uloop initialization | expand |
Hi Leon, Please add a prefix for which application with patch is next time. git format-patch origin/master --subject-prefix="PATCH uqmi" On 11/27/22 09:38, Leon M. Busch-George wrote: > uloop_init is already called in main. > uloop_done is just missing. > > Signed-off-by: Leon M. Busch-George <leon@georgemail.eu> > --- > dev.c | 2 -- > main.c | 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dev.c b/dev.c > index bd10207..9eb7209 100644 > --- a/dev.c > +++ b/dev.c > @@ -353,8 +353,6 @@ int qmi_device_open(struct qmi_dev *qmi, const char *path) > struct ustream *us = &qmi->sf.stream; > int fd; > > - uloop_init(); > - > fd = open(path, O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY); > if (fd < 0) > return -1; I am not familiar with the uqmi code. Should we move the uloop handling completely to the dev.c file? > diff --git a/main.c b/main.c > index aa4634c..e3ccf08 100644 > --- a/main.c > +++ b/main.c > @@ -168,5 +168,7 @@ int main(int argc, char **argv) > > qmi_device_close(&dev); > > + uloop_done(); > + > return ret; > } Hauke
diff --git a/dev.c b/dev.c index bd10207..9eb7209 100644 --- a/dev.c +++ b/dev.c @@ -353,8 +353,6 @@ int qmi_device_open(struct qmi_dev *qmi, const char *path) struct ustream *us = &qmi->sf.stream; int fd; - uloop_init(); - fd = open(path, O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY); if (fd < 0) return -1; diff --git a/main.c b/main.c index aa4634c..e3ccf08 100644 --- a/main.c +++ b/main.c @@ -168,5 +168,7 @@ int main(int argc, char **argv) qmi_device_close(&dev); + uloop_done(); + return ret; }
uloop_init is already called in main. uloop_done is just missing. Signed-off-by: Leon M. Busch-George <leon@georgemail.eu> --- dev.c | 2 -- main.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)