This patch converts the gobi driver from being a 'plugin' to being a
regular 'modem driver'.

Modem drivers, in general, use a lot of internal ofono functionality and
cannot be built standalone against just the exported ofono headers.  As
such, these cannot be built as plugins and therefore should netiher be part
of the plugins directory nor declared as plugins.
---
 Makefile.am                          |  5 ++---
 {plugins => drivers/qmimodem}/gobi.c | 13 +------------
 2 files changed, 3 insertions(+), 15 deletions(-)
 rename {plugins => drivers/qmimodem}/gobi.c (97%)

diff --git a/Makefile.am b/Makefile.am
index e8e4ed95..f7bcb4cd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -237,10 +237,9 @@ builtin_sources += $(qmi_sources) \
                        drivers/qmimodem/lte.c \
                        drivers/qmimodem/radio-settings.c \
                        drivers/qmimodem/location-reporting.c \
-                       drivers/qmimodem/netmon.c
+                       drivers/qmimodem/netmon.c \
+                       drivers/qmimodem/gobi.c
 
-builtin_modules += gobi
-builtin_sources += plugins/gobi.c
 endif
 
 if ATMODEM
diff --git a/plugins/gobi.c b/drivers/qmimodem/gobi.c
similarity index 97%
rename from plugins/gobi.c
rename to drivers/qmimodem/gobi.c
index d5a5965e..69a682a8 100644
--- a/plugins/gobi.c
+++ b/drivers/qmimodem/gobi.c
@@ -529,15 +529,4 @@ static const struct ofono_modem_driver gobi_driver = {
        .post_online    = gobi_post_online,
 };
 
-static int gobi_init(void)
-{
-       return ofono_modem_driver_register(&gobi_driver);
-}
-
-static void gobi_exit(void)
-{
-       ofono_modem_driver_unregister(&gobi_driver);
-}
-
-OFONO_PLUGIN_DEFINE(gobi, "Qualcomm Gobi modem driver", VERSION,
-                       OFONO_PLUGIN_PRIORITY_DEFAULT, gobi_init, gobi_exit)
+OFONO_MODEM_DRIVER(&gobi_driver)
-- 
2.17.1

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to