diff --git a/Makefile.am b/Makefile.am index ab992837..9763d006 100644 --- a/Makefile.am +++ b/Makefile.am @@ -192,7 +192,8 @@ builtin_sources += drivers/atmodem/atutil.h \ drivers/huaweimodem/voicecall.c \ drivers/huaweimodem/audio-settings.c \ drivers/huaweimodem/gprs-context.c \ - drivers/huaweimodem/radio-settings.c + drivers/huaweimodem/radio-settings.c \ + drivers/huaweimodem/cdma-netreg.c builtin_modules += calypsomodem builtin_sources += drivers/atmodem/atutil.h \ @@ -274,12 +275,6 @@ builtin_sources += drivers/cdmamodem/cdmamodem.h \ drivers/cdmamodem/voicecall.c \ drivers/cdmamodem/devinfo.c \ drivers/cdmamodem/connman.c - -builtin_modules += huaweicdmamodem -builtin_sources += drivers/huaweicdmamodem/huaweicdmamodem.h \ - drivers/huaweicdmamodem/huaweicdmamodem.c \ - drivers/huaweicdmamodem/network-registration.c - endif builtin_modules += g1 diff --git a/drivers/huaweicdmamodem/huaweicdmamodem.c b/drivers/huaweicdmamodem/huaweicdmamodem.c deleted file mode 100644 index 4e9c4008..00000000 --- a/drivers/huaweicdmamodem/huaweicdmamodem.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * oFono - Open Source Telephony - * - * Copyright (C) 2008-2011 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#define OFONO_API_SUBJECT_TO_CHANGE -#include - -#include "huaweicdmamodem.h" - -static int huaweicdmamodem_init(void) -{ - huaweicdma_netreg_init(); - - return 0; -} - -static void huaweicdmamodem_exit(void) -{ - huaweicdma_netreg_exit(); -} - -OFONO_PLUGIN_DEFINE(huaweicdmamodem, "Huawei CDMA modem driver", VERSION, - OFONO_PLUGIN_PRIORITY_DEFAULT, - huaweicdmamodem_init, huaweicdmamodem_exit) diff --git a/drivers/huaweicdmamodem/huaweicdmamodem.h b/drivers/huaweicdmamodem/huaweicdmamodem.h deleted file mode 100644 index 799d3a88..00000000 --- a/drivers/huaweicdmamodem/huaweicdmamodem.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * - * oFono - Open Source Telephony - * - * Copyright (C) 2008-2011 Intel Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -extern void huaweicdma_netreg_init(void); -extern void huaweicdma_netreg_exit(void); diff --git a/drivers/huaweicdmamodem/network-registration.c b/drivers/huaweimodem/cdma-netreg.c similarity index 93% rename from drivers/huaweicdmamodem/network-registration.c rename to drivers/huaweimodem/cdma-netreg.c index 0052044a..2ae66e17 100644 --- a/drivers/huaweicdmamodem/network-registration.c +++ b/drivers/huaweimodem/cdma-netreg.c @@ -33,7 +33,7 @@ #include "gatchat.h" -#include "huaweicdmamodem.h" +#include "huaweimodem.h" static const char *sysinfo_prefix[] = { "^SYSINFO:", NULL }; @@ -188,7 +188,7 @@ static void probe_cb(gboolean ok, GAtResult *result, gpointer user_data) ofono_cdma_netreg_register(netreg); } -static int huaweicdma_netreg_probe(struct ofono_cdma_netreg *netreg, +static int huawei_cdma_netreg_probe(struct ofono_cdma_netreg *netreg, unsigned int vendor, void *data) { GAtChat *chat = g_at_chat_clone(data); @@ -201,7 +201,7 @@ static int huaweicdma_netreg_probe(struct ofono_cdma_netreg *netreg, return 0; } -static void huaweicdma_netreg_remove(struct ofono_cdma_netreg *netreg) +static void huawei_cdma_netreg_remove(struct ofono_cdma_netreg *netreg) { GAtChat *chat = ofono_cdma_netreg_get_data(netreg); @@ -211,17 +211,17 @@ static void huaweicdma_netreg_remove(struct ofono_cdma_netreg *netreg) } static struct ofono_cdma_netreg_driver driver = { - .name = "huaweicdmamodem", - .probe = huaweicdma_netreg_probe, - .remove = huaweicdma_netreg_remove, + .name = "huaweimodem", + .probe = huawei_cdma_netreg_probe, + .remove = huawei_cdma_netreg_remove, }; -void huaweicdma_netreg_init(void) +void huawei_cdma_netreg_init(void) { ofono_cdma_netreg_driver_register(&driver); } -void huaweicdma_netreg_exit(void) +void huawei_cdma_netreg_exit(void) { ofono_cdma_netreg_driver_unregister(&driver); } diff --git a/drivers/huaweimodem/huaweimodem.c b/drivers/huaweimodem/huaweimodem.c index 53b91ed3..ac084c2d 100644 --- a/drivers/huaweimodem/huaweimodem.c +++ b/drivers/huaweimodem/huaweimodem.c @@ -39,11 +39,15 @@ static int huaweimodem_init(void) huawei_radio_settings_init(); huawei_gprs_context_init(); + huawei_cdma_netreg_init(); + return 0; } static void huaweimodem_exit(void) { + huawei_cdma_netreg_exit(); + huawei_gprs_context_exit(); huawei_radio_settings_exit(); huawei_audio_settings_exit(); diff --git a/drivers/huaweimodem/huaweimodem.h b/drivers/huaweimodem/huaweimodem.h index 898f6fcb..31ab9f96 100644 --- a/drivers/huaweimodem/huaweimodem.h +++ b/drivers/huaweimodem/huaweimodem.h @@ -32,3 +32,6 @@ extern void huawei_radio_settings_exit(void); extern void huawei_gprs_context_init(void); extern void huawei_gprs_context_exit(void); + +extern void huawei_cdma_netreg_init(void); +extern void huawei_cdma_netreg_exit(void);