drivers: constify vtables

The driver vtables are read-only structures.  This patch declares them as
'const' allowing the compiler to (optionally) put them in the RELRO
section.  RELRO pages may be marked as read-only by the linker after
the relocations have been done ensuring that they aren't inadvertently
or maliciously altered at runtime.
This commit is contained in:
Jonas Bonn 2018-10-17 15:36:10 +02:00 committed by Denis Kenzior
parent ef6c257a3e
commit 67701b1c40
120 changed files with 121 additions and 121 deletions

View File

@ -212,7 +212,7 @@ static void at_call_barring_remove(struct ofono_call_barring *cb)
ofono_call_barring_set_data(cb, NULL);
}
static struct ofono_call_barring_driver driver = {
static const struct ofono_call_barring_driver driver = {
.name = "atmodem",
.probe = at_call_barring_probe,
.remove = at_call_barring_remove,

View File

@ -264,7 +264,7 @@ static void at_ccfc_remove(struct ofono_call_forwarding *cf)
ofono_call_forwarding_set_data(cf, NULL);
}
static struct ofono_call_forwarding_driver driver = {
static const struct ofono_call_forwarding_driver driver = {
.name = "atmodem",
.probe = at_ccfc_probe,
.remove = at_ccfc_remove,

View File

@ -331,7 +331,7 @@ static void at_caoc_remove(struct ofono_call_meter *cm)
ofono_call_meter_set_data(cm, NULL);
}
static struct ofono_call_meter_driver driver = {
static const struct ofono_call_meter_driver driver = {
.name = "atmodem",
.probe = at_caoc_probe,
.remove = at_caoc_remove,

View File

@ -398,7 +398,7 @@ static void at_call_settings_remove(struct ofono_call_settings *cs)
ofono_call_settings_set_data(cs, NULL);
}
static struct ofono_call_settings_driver driver = {
static const struct ofono_call_settings_driver driver = {
.name = "atmodem",
.probe = at_call_settings_probe,
.remove = at_call_settings_remove,

View File

@ -207,7 +207,7 @@ static void at_call_volume_remove(struct ofono_call_volume *cv)
g_free(cvd);
}
static struct ofono_call_volume_driver driver = {
static const struct ofono_call_volume_driver driver = {
.name = "atmodem",
.probe = at_call_volume_probe,
.remove = at_call_volume_remove,

View File

@ -304,7 +304,7 @@ static void at_cbs_remove(struct ofono_cbs *cbs)
g_free(data);
}
static struct ofono_cbs_driver driver = {
static const struct ofono_cbs_driver driver = {
.name = "atmodem",
.probe = at_cbs_probe,
.remove = at_cbs_remove,

View File

@ -153,7 +153,7 @@ static void at_devinfo_remove(struct ofono_devinfo *info)
g_at_chat_unref(chat);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = "atmodem",
.probe = at_devinfo_probe,
.remove = at_devinfo_remove,

View File

@ -263,7 +263,7 @@ static void at_gnss_remove(struct ofono_gnss *gnss)
g_free(gd);
}
static struct ofono_gnss_driver driver = {
static const struct ofono_gnss_driver driver = {
.name = "atmodem",
.probe = at_gnss_probe,
.remove = at_gnss_remove,

View File

@ -494,7 +494,7 @@ static void at_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "atmodem",
.probe = at_gprs_context_probe,
.remove = at_gprs_context_remove,

View File

@ -642,7 +642,7 @@ static void at_gprs_remove(struct ofono_gprs *gprs)
g_free(gd);
}
static struct ofono_gprs_driver driver = {
static const struct ofono_gprs_driver driver = {
.name = "atmodem",
.probe = at_gprs_probe,
.remove = at_gprs_remove,

View File

@ -124,7 +124,7 @@ static void at_lte_remove(struct ofono_lte *lte)
g_free(ldd);
}
static struct ofono_lte_driver driver = {
static const struct ofono_lte_driver driver = {
.name = "atmodem",
.probe = at_lte_probe,
.remove = at_lte_remove,

View File

@ -2155,7 +2155,7 @@ static void at_netreg_remove(struct ofono_netreg *netreg)
g_free(nd);
}
static struct ofono_netreg_driver driver = {
static const struct ofono_netreg_driver driver = {
.name = "atmodem",
.probe = at_netreg_probe,
.remove = at_netreg_remove,

View File

@ -593,7 +593,7 @@ static void at_phonebook_remove(struct ofono_phonebook *pb)
g_free(pbd);
}
static struct ofono_phonebook_driver driver = {
static const struct ofono_phonebook_driver driver = {
.name = "atmodem",
.probe = at_phonebook_probe,
.remove = at_phonebook_remove,

View File

@ -1959,7 +1959,7 @@ static void at_sim_remove(struct ofono_sim *sim)
g_free(sd);
}
static struct ofono_sim_driver driver = {
static const struct ofono_sim_driver driver = {
.name = "atmodem",
.probe = at_sim_probe,
.remove = at_sim_remove,
@ -1987,7 +1987,7 @@ static struct ofono_sim_driver driver = {
.logical_access = at_logical_access
};
static struct ofono_sim_driver driver_noef = {
static const struct ofono_sim_driver driver_noef = {
.name = "atmodem-noef",
.probe = at_sim_probe,
.remove = at_sim_remove,

View File

@ -1320,7 +1320,7 @@ static void at_sms_remove(struct ofono_sms *sms)
ofono_sms_set_data(sms, NULL);
}
static struct ofono_sms_driver driver = {
static const struct ofono_sms_driver driver = {
.name = "atmodem",
.probe = at_sms_probe,
.remove = at_sms_remove,

View File

@ -223,7 +223,7 @@ static void at_stk_remove(struct ofono_stk *stk)
g_free(sd);
}
static struct ofono_stk_driver driver = {
static const struct ofono_stk_driver driver = {
.name = "atmodem",
.probe = at_stk_probe,
.remove = at_stk_remove,

View File

@ -327,7 +327,7 @@ static void at_ussd_remove(struct ofono_ussd *ussd)
g_free(data);
}
static struct ofono_ussd_driver driver = {
static const struct ofono_ussd_driver driver = {
.name = "atmodem",
.probe = at_ussd_probe,
.remove = at_ussd_remove,

View File

@ -1155,7 +1155,7 @@ static void at_voicecall_remove(struct ofono_voicecall *vc)
g_free(vd);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "atmodem",
.probe = at_voicecall_probe,
.remove = at_voicecall_remove,

View File

@ -292,7 +292,7 @@ static void calypso_stk_remove(struct ofono_stk *stk)
g_free(sd);
}
static struct ofono_stk_driver driver = {
static const struct ofono_stk_driver driver = {
.name = "calypsomodem",
.probe = calypso_stk_probe,
.remove = calypso_stk_remove,

View File

@ -402,7 +402,7 @@ static void calypso_voicecall_remove(struct ofono_voicecall *vc)
g_free(vd);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "calypsomodem",
.probe = calypso_voicecall_probe,
.remove = calypso_voicecall_remove,

View File

@ -323,7 +323,7 @@ static void cdma_connman_remove(struct ofono_cdma_connman *cm)
g_free(cd);
}
static struct ofono_cdma_connman_driver driver = {
static const struct ofono_cdma_connman_driver driver = {
.name = "cdmamodem",
.probe = cdma_connman_probe,
.remove = cdma_connman_remove,

View File

@ -153,7 +153,7 @@ static void cdma_devinfo_remove(struct ofono_devinfo *info)
ofono_devinfo_set_data(info, NULL);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = "cdmamodem",
.probe = cdma_devinfo_probe,
.remove = cdma_devinfo_remove,

View File

@ -143,7 +143,7 @@ static void cdma_voicecall_remove(struct ofono_cdma_voicecall *vc)
g_free(vd);
}
static struct ofono_cdma_voicecall_driver driver = {
static const struct ofono_cdma_voicecall_driver driver = {
.name = "cdmamodem",
.probe = cdma_voicecall_probe,
.remove = cdma_voicecall_remove,

View File

@ -73,7 +73,7 @@ static void dun_gprs_attached_status(struct ofono_gprs *gprs,
CALLBACK_WITH_SUCCESS(cb, 1, data);
}
static struct ofono_gprs_driver driver = {
static const struct ofono_gprs_driver driver = {
.name = "dunmodem",
.probe = dun_gprs_probe,
.remove = dun_gprs_remove,

View File

@ -107,7 +107,7 @@ static void dun_netreg_remove(struct ofono_netreg *netreg)
g_free(nd);
}
static struct ofono_netreg_driver driver = {
static const struct ofono_netreg_driver driver = {
.name = "dunmodem",
.probe = dun_netreg_probe,
.remove = dun_netreg_remove,

View File

@ -217,7 +217,7 @@ static void gemalto_location_reporting_remove(struct ofono_location_reporting *l
g_free(gd);
}
static struct ofono_location_reporting_driver driver = {
static const struct ofono_location_reporting_driver driver = {
.name = "gemaltomodem",
.type = OFONO_LOCATION_REPORTING_TYPE_NMEA,
.probe = gemalto_location_reporting_probe,

View File

@ -218,7 +218,7 @@ static void hfp_call_volume_remove(struct ofono_call_volume *cv)
g_free(vd);
}
static struct ofono_call_volume_driver driver = {
static const struct ofono_call_volume_driver driver = {
.name = "hfpmodem",
.probe = hfp_call_volume_probe,
.remove = hfp_call_volume_remove,

View File

@ -91,7 +91,7 @@ static void hfp_devinfo_remove(struct ofono_devinfo *info)
g_free(dd);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = "hfpmodem",
.probe = hfp_devinfo_probe,
.remove = hfp_devinfo_remove,

View File

@ -411,7 +411,7 @@ static void hfp_hf_indicator(struct ofono_handsfree *hf,
CALLBACK_WITH_FAILURE(cb, data);
}
static struct ofono_handsfree_driver driver = {
static const struct ofono_handsfree_driver driver = {
.name = "hfpmodem",
.probe = hfp_handsfree_probe,
.remove = hfp_handsfree_remove,

View File

@ -343,7 +343,7 @@ static void hfp_netreg_remove(struct ofono_netreg *netreg)
g_free(nd);
}
static struct ofono_netreg_driver driver = {
static const struct ofono_netreg_driver driver = {
.name = "hfpmodem",
.probe = hfp_netreg_probe,
.remove = hfp_netreg_remove,

View File

@ -196,7 +196,7 @@ static void hfp_siri_set_eyes_free_mode(struct ofono_siri *siri,
CALLBACK_WITH_FAILURE(cb, NULL);
}
static struct ofono_siri_driver driver = {
static const struct ofono_siri_driver driver = {
.name = "hfpmodem",
.probe = hfp_siri_probe,
.remove = hfp_siri_remove,

View File

@ -1303,7 +1303,7 @@ static void hfp_voicecall_remove(struct ofono_voicecall *vc)
g_free(vd);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "hfpmodem",
.probe = hfp_voicecall_probe,
.remove = hfp_voicecall_remove,

View File

@ -379,7 +379,7 @@ static void hso_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "hsomodem",
.probe = hso_gprs_context_probe,
.remove = hso_gprs_context_remove,

View File

@ -199,7 +199,7 @@ static void hso_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(rsd);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "hsomodem",
.probe = hso_radio_settings_probe,
.remove = hso_radio_settings_remove,

View File

@ -113,7 +113,7 @@ static void huawei_audio_settings_remove(struct ofono_audio_settings *as)
g_free(asd);
}
static struct ofono_audio_settings_driver driver = {
static const struct ofono_audio_settings_driver driver = {
.name = "huaweimodem",
.probe = huawei_audio_settings_probe,
.remove = huawei_audio_settings_remove,

View File

@ -210,7 +210,7 @@ static void huawei_cdma_netreg_remove(struct ofono_cdma_netreg *netreg)
g_at_chat_unref(chat);
}
static struct ofono_cdma_netreg_driver driver = {
static const struct ofono_cdma_netreg_driver driver = {
.name = "huaweimodem",
.probe = huawei_cdma_netreg_probe,
.remove = huawei_cdma_netreg_remove,

View File

@ -339,7 +339,7 @@ static void huawei_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "huaweimodem",
.probe = huawei_gprs_context_probe,
.remove = huawei_gprs_context_remove,

View File

@ -569,7 +569,7 @@ static void huawei_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(rsd);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "huaweimodem",
.probe = huawei_radio_settings_probe,
.remove = huawei_radio_settings_remove,

View File

@ -204,7 +204,7 @@ static void huawei_ussd_remove(struct ofono_ussd *ussd)
g_free(data);
}
static struct ofono_ussd_driver driver = {
static const struct ofono_ussd_driver driver = {
.name = "huaweimodem",
.probe = huawei_ussd_probe,
.remove = huawei_ussd_remove,

View File

@ -497,7 +497,7 @@ static void huawei_voicecall_remove(struct ofono_voicecall *vc)
g_free(vd);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "huaweimodem",
.probe = huawei_voicecall_probe,
.remove = huawei_voicecall_remove,

View File

@ -403,7 +403,7 @@ static void icera_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "iceramodem",
.probe = icera_gprs_context_probe,
.remove = icera_gprs_context_remove,

View File

@ -212,7 +212,7 @@ static void icera_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(rsd);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "iceramodem",
.probe = icera_radio_settings_probe,
.remove = icera_radio_settings_remove,

View File

@ -382,7 +382,7 @@ static void ifx_audio_settings_remove(struct ofono_audio_settings *as)
g_free(asd);
}
static struct ofono_audio_settings_driver driver = {
static const struct ofono_audio_settings_driver driver = {
.name = "ifxmodem",
.probe = ifx_audio_settings_probe,
.remove = ifx_audio_settings_remove,

View File

@ -167,7 +167,7 @@ static void ifx_ctm_remove(struct ofono_ctm *ctm)
g_free(ctmd);
}
static struct ofono_ctm_driver driver = {
static const struct ofono_ctm_driver driver = {
.name = "ifxmodem",
.probe = ifx_ctm_probe,
.remove = ifx_ctm_remove,

View File

@ -661,7 +661,7 @@ static void ifx_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "ifxmodem",
.probe = ifx_gprs_context_probe,
.remove = ifx_gprs_context_remove,

View File

@ -201,7 +201,7 @@ static void ifx_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(rsd);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "ifxmodem",
.probe = ifx_radio_settings_probe,
.remove = ifx_radio_settings_remove,

View File

@ -307,7 +307,7 @@ static void ifx_stk_remove(struct ofono_stk *stk)
g_free(sd);
}
static struct ofono_stk_driver driver = {
static const struct ofono_stk_driver driver = {
.name = "ifxmodem",
.probe = ifx_stk_probe,
.remove = ifx_stk_remove,

View File

@ -1019,7 +1019,7 @@ static void ifx_voicecall_remove(struct ofono_voicecall *vc)
g_free(vd);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "ifxmodem",
.probe = ifx_voicecall_probe,
.remove = ifx_voicecall_remove,

View File

@ -117,7 +117,7 @@ static void isi_audio_settings_remove(struct ofono_audio_settings *as)
g_free(asd);
}
static struct ofono_audio_settings_driver driver = {
static const struct ofono_audio_settings_driver driver = {
.name = "isimodem",
.probe = isi_audio_settings_probe,
.remove = isi_audio_settings_remove,

View File

@ -429,7 +429,7 @@ static void isi_call_barring_remove(struct ofono_call_barring *barr)
g_free(data);
}
static struct ofono_call_barring_driver driver = {
static const struct ofono_call_barring_driver driver = {
.name = "isimodem",
.probe = isi_call_barring_probe,
.remove = isi_call_barring_remove,

View File

@ -457,7 +457,7 @@ static void isi_call_forwarding_remove(struct ofono_call_forwarding *cf)
g_free(data);
}
static struct ofono_call_forwarding_driver driver = {
static const struct ofono_call_forwarding_driver driver = {
.name = "isimodem",
.probe = isi_call_forwarding_probe,
.remove = isi_call_forwarding_remove,

View File

@ -118,7 +118,7 @@ static void isi_call_meter_remove(struct ofono_call_meter *cm)
g_free(data);
}
static struct ofono_call_meter_driver driver = {
static const struct ofono_call_meter_driver driver = {
.name = "isimodem",
.probe = isi_call_meter_probe,
.remove = isi_call_meter_remove,

View File

@ -405,7 +405,7 @@ static void isi_call_settings_remove(struct ofono_call_settings *cs)
g_free(data);
}
static struct ofono_call_settings_driver driver = {
static const struct ofono_call_settings_driver driver = {
.name = "isimodem",
.probe = isi_call_settings_probe,
.remove = isi_call_settings_remove,

View File

@ -227,7 +227,7 @@ static void isi_cbs_remove(struct ofono_cbs *cbs)
g_free(cd);
}
static struct ofono_cbs_driver driver = {
static const struct ofono_cbs_driver driver = {
.name = "isimodem",
.probe = isi_cbs_probe,
.remove = isi_cbs_remove,

View File

@ -252,7 +252,7 @@ static void isi_devinfo_remove(struct ofono_devinfo *info)
g_free(data);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = "isimodem",
.probe = isi_devinfo_probe,
.remove = isi_devinfo_remove,

View File

@ -663,7 +663,7 @@ static void isi_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(cd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "isimodem",
.probe = isi_gprs_context_probe,
.remove = isi_gprs_context_remove,

View File

@ -490,7 +490,7 @@ error:
g_free(cbd);
}
static struct ofono_gprs_driver driver = {
static const struct ofono_gprs_driver driver = {
.name = "isimodem",
.probe = isi_gprs_probe,
.remove = isi_gprs_remove,

View File

@ -1165,7 +1165,7 @@ static void isi_netreg_remove(struct ofono_netreg *netreg)
g_free(data);
}
static struct ofono_netreg_driver isimodem = {
static const struct ofono_netreg_driver isimodem = {
.name = "isimodem",
.probe = isi_netreg_probe,
.remove = isi_netreg_remove,

View File

@ -340,7 +340,7 @@ static void isi_phonebook_remove(struct ofono_phonebook *pb)
g_free(data);
}
static struct ofono_phonebook_driver driver = {
static const struct ofono_phonebook_driver driver = {
.name = "isimodem",
.probe = isi_phonebook_probe,
.remove = isi_phonebook_remove,

View File

@ -365,7 +365,7 @@ static void isi_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(rd);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "isimodem",
.probe = isi_radio_settings_probe,
.remove = isi_radio_settings_remove,

View File

@ -969,7 +969,7 @@ static void isi_sim_remove(struct ofono_sim *sim)
g_free(data);
}
static struct ofono_sim_driver driver = {
static const struct ofono_sim_driver driver = {
.name = "isimodem",
.probe = isi_sim_probe,
.remove = isi_sim_remove,

View File

@ -1121,7 +1121,7 @@ static void isi_sms_remove(struct ofono_sms *sms)
g_free(sd);
}
static struct ofono_sms_driver driver = {
static const struct ofono_sms_driver driver = {
.name = "isimodem",
.probe = isi_sms_probe,
.remove = isi_sms_remove,

View File

@ -1651,7 +1651,7 @@ static void uicc_sim_remove(struct ofono_sim *sim)
g_free(data);
}
static struct ofono_sim_driver driver = {
static const struct ofono_sim_driver driver = {
.name = "wgmodem2.5",
.probe = uicc_sim_probe,
.remove = uicc_sim_remove,

View File

@ -276,7 +276,7 @@ static void isi_ussd_remove(struct ofono_ussd *ussd)
g_free(data);
}
static struct ofono_ussd_driver driver = {
static const struct ofono_ussd_driver driver = {
.name = "isimodem",
.probe = isi_ussd_probe,
.remove = isi_ussd_remove,

View File

@ -1935,7 +1935,7 @@ static void isi_remove(struct ofono_voicecall *call)
g_free(data);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "isimodem",
.probe = isi_probe,
.remove = isi_remove,

View File

@ -88,7 +88,7 @@ static void mbim_devinfo_remove(struct ofono_devinfo *info)
l_free(dd);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = "mbim",
.probe = mbim_devinfo_probe,
.remove = mbim_devinfo_remove,

View File

@ -454,7 +454,7 @@ static void mbim_gprs_context_remove(struct ofono_gprs_context *gc)
l_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "mbim",
.probe = mbim_gprs_context_probe,
.remove = mbim_gprs_context_remove,

View File

@ -280,7 +280,7 @@ static void mbim_gprs_remove(struct ofono_gprs *gprs)
l_free(gd);
}
static struct ofono_gprs_driver driver = {
static const struct ofono_gprs_driver driver = {
.name = "mbim",
.probe = mbim_gprs_probe,
.remove = mbim_gprs_remove,

View File

@ -395,7 +395,7 @@ static void mbim_netreg_remove(struct ofono_netreg *netreg)
l_free(nd);
}
static struct ofono_netreg_driver driver = {
static const struct ofono_netreg_driver driver = {
.name = "mbim",
.probe = mbim_netreg_probe,
.remove = mbim_netreg_remove,

View File

@ -509,7 +509,7 @@ static void mbim_sim_remove(struct ofono_sim *sim)
l_free(sd);
}
static struct ofono_sim_driver driver = {
static const struct ofono_sim_driver driver = {
.name = "mbim",
.probe = mbim_sim_probe,
.remove = mbim_sim_remove,

View File

@ -496,7 +496,7 @@ static void mbim_sms_remove(struct ofono_sms *sms)
l_free(sd);
}
static struct ofono_sms_driver driver = {
static const struct ofono_sms_driver driver = {
.name = "mbim",
.probe = mbim_sms_probe,
.remove = mbim_sms_remove,

View File

@ -511,7 +511,7 @@ static void mbm_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "mbmmodem",
.probe = mbm_gprs_context_probe,
.remove = mbm_gprs_context_remove,

View File

@ -231,7 +231,7 @@ static void mbm_location_reporting_remove(struct ofono_location_reporting *lr)
g_free(gd);
}
static struct ofono_location_reporting_driver driver = {
static const struct ofono_location_reporting_driver driver = {
.name = "mbmmodem",
.type = OFONO_LOCATION_REPORTING_TYPE_NMEA,
.probe = mbm_location_reporting_probe,

View File

@ -262,7 +262,7 @@ static void mbm_stk_remove(struct ofono_stk *stk)
g_free(sd);
}
static struct ofono_stk_driver driver = {
static const struct ofono_stk_driver driver = {
.name = "mbmmodem",
.probe = mbm_stk_probe,
.remove = mbm_stk_remove,

View File

@ -195,7 +195,7 @@ static void nw_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(rsd);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "nwmodem",
.probe = nw_radio_settings_probe,
.remove = nw_radio_settings_remove,

View File

@ -208,7 +208,7 @@ static void qmi_devinfo_remove(struct ofono_devinfo *devinfo)
g_free(data);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = "qmimodem",
.probe = qmi_devinfo_probe,
.remove = qmi_devinfo_remove,

View File

@ -491,7 +491,7 @@ static void qmi_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(data);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = "qmimodem",
.probe = qmi_gprs_context_probe,
.remove = qmi_gprs_context_remove,

View File

@ -408,7 +408,7 @@ static void qmi_gprs_remove(struct ofono_gprs *gprs)
g_free(data);
}
static struct ofono_gprs_driver driver = {
static const struct ofono_gprs_driver driver = {
.name = "qmimodem",
.probe = qmi_gprs_probe,
.remove = qmi_gprs_remove,

View File

@ -278,7 +278,7 @@ static void qmi_location_reporting_remove(struct ofono_location_reporting *lr)
g_free(data);
}
static struct ofono_location_reporting_driver driver = {
static const struct ofono_location_reporting_driver driver = {
.name = "qmimodem",
.type = OFONO_LOCATION_REPORTING_TYPE_NMEA,
.probe = qmi_location_reporting_probe,

View File

@ -247,7 +247,7 @@ static void qmimodem_lte_remove(struct ofono_lte *lte)
g_free(ldd);
}
static struct ofono_lte_driver driver = {
static const struct ofono_lte_driver driver = {
.name = "qmimodem",
.probe = qmimodem_lte_probe,
.remove = qmimodem_lte_remove,

View File

@ -268,7 +268,7 @@ static void qmi_netmon_remove(struct ofono_netmon *netmon)
g_free(nmd);
}
static struct ofono_netmon_driver driver = {
static const struct ofono_netmon_driver driver = {
.name = "qmimodem",
.probe = qmi_netmon_probe,
.remove = qmi_netmon_remove,

View File

@ -637,7 +637,7 @@ static void qmi_netreg_remove(struct ofono_netreg *netreg)
g_free(data);
}
static struct ofono_netreg_driver driver = {
static const struct ofono_netreg_driver driver = {
.name = "qmimodem",
.probe = qmi_netreg_probe,
.remove = qmi_netreg_remove,

View File

@ -287,7 +287,7 @@ static void qmi_radio_settings_remove(struct ofono_radio_settings *rs)
g_free(data);
}
static struct ofono_radio_settings_driver driver = {
static const struct ofono_radio_settings_driver driver = {
.name = "qmimodem",
.probe = qmi_radio_settings_probe,
.remove = qmi_radio_settings_remove,

View File

@ -379,7 +379,7 @@ static void qmi_sim_remove(struct ofono_sim *sim)
g_free(data);
}
static struct ofono_sim_driver driver = {
static const struct ofono_sim_driver driver = {
.name = "qmimodem-legacy",
.probe = qmi_sim_probe,
.remove = qmi_sim_remove,

View File

@ -911,7 +911,7 @@ static void qmi_sim_remove(struct ofono_sim *sim)
g_free(data);
}
static struct ofono_sim_driver driver = {
static const struct ofono_sim_driver driver = {
.name = "qmimodem",
.probe = qmi_sim_probe,
.remove = qmi_sim_remove,

View File

@ -571,7 +571,7 @@ static void qmi_sms_remove(struct ofono_sms *sms)
g_free(data);
}
static struct ofono_sms_driver driver = {
static const struct ofono_sms_driver driver = {
.name = "qmimodem",
.probe = qmi_sms_probe,
.remove = qmi_sms_remove,

View File

@ -270,7 +270,7 @@ error:
CALLBACK_WITH_FAILURE(cb, data);
}
static struct ofono_ussd_driver driver = {
static const struct ofono_ussd_driver driver = {
.name = "qmimodem",
.probe = qmi_ussd_probe,
.remove = qmi_ussd_remove,

View File

@ -95,7 +95,7 @@ static void qmi_voicecall_remove(struct ofono_voicecall *vc)
g_free(data);
}
static struct ofono_voicecall_driver driver = {
static const struct ofono_voicecall_driver driver = {
.name = "qmimodem",
.probe = qmi_voicecall_probe,
.remove = qmi_voicecall_remove,

View File

@ -270,7 +270,7 @@ static void ril_call_barring_remove(struct ofono_call_barring *cb)
g_free(data);
}
static struct ofono_call_barring_driver driver = {
static const struct ofono_call_barring_driver driver = {
.name = "rilmodem",
.probe = ril_call_barring_probe,
.remove = ril_call_barring_remove,

View File

@ -377,7 +377,7 @@ static void ril_call_forwarding_remove(struct ofono_call_forwarding *cf)
g_free(data);
}
static struct ofono_call_forwarding_driver driver = {
static const struct ofono_call_forwarding_driver driver = {
.name = RILMODEM,
.probe = ril_call_forwarding_probe,
.remove = ril_call_forwarding_remove,

View File

@ -320,7 +320,7 @@ static void ril_call_settings_remove(struct ofono_call_settings *cs)
g_free(sd);
}
static struct ofono_call_settings_driver driver = {
static const struct ofono_call_settings_driver driver = {
.name = RILMODEM,
.probe = ril_call_settings_probe,
.remove = ril_call_settings_remove,

View File

@ -170,7 +170,7 @@ static void ril_call_volume_remove(struct ofono_call_volume *cv)
g_free(cvd);
}
static struct ofono_call_volume_driver driver = {
static const struct ofono_call_volume_driver driver = {
.name = RILMODEM,
.probe = ril_call_volume_probe,
.remove = ril_call_volume_remove,

View File

@ -194,7 +194,7 @@ static void ril_cbs_remove(struct ofono_cbs *cbs)
g_free(data);
}
static struct ofono_cbs_driver driver = {
static const struct ofono_cbs_driver driver = {
.name = RILMODEM,
.probe = ril_cbs_probe,
.remove = ril_cbs_remove,

View File

@ -212,7 +212,7 @@ static void ril_devinfo_remove(struct ofono_devinfo *info)
g_ril_unref(ril);
}
static struct ofono_devinfo_driver driver = {
static const struct ofono_devinfo_driver driver = {
.name = RILMODEM,
.probe = ril_devinfo_probe,
.remove = ril_devinfo_remove,

View File

@ -857,7 +857,7 @@ static void ril_gprs_context_remove(struct ofono_gprs_context *gc)
g_free(gcd);
}
static struct ofono_gprs_context_driver driver = {
static const struct ofono_gprs_context_driver driver = {
.name = RILMODEM,
.probe = ril_gprs_context_probe,
.remove = ril_gprs_context_remove,

View File

@ -515,7 +515,7 @@ static void ril_gprs_remove(struct ofono_gprs *gprs)
g_free(gd);
}
static struct ofono_gprs_driver driver = {
static const struct ofono_gprs_driver driver = {
.name = RILMODEM,
.probe = ril_gprs_probe,
.remove = ril_gprs_remove,

View File

@ -141,7 +141,7 @@ static void ril_lte_remove(struct ofono_lte *lte)
g_free(ld);
}
static struct ofono_lte_driver driver = {
static const struct ofono_lte_driver driver = {
.name = RILMODEM,
.probe = ril_lte_probe,
.remove = ril_lte_remove,

View File

@ -339,7 +339,7 @@ static void ril_netmon_periodic_update(struct ofono_netmon *netmon,
CALLBACK_WITH_FAILURE(cb, cbd->data);
}
static struct ofono_netmon_driver driver = {
static const struct ofono_netmon_driver driver = {
.name = RILMODEM,
.probe = ril_netmon_probe,
.remove = ril_netmon_remove,

View File

@ -834,7 +834,7 @@ static void ril_netreg_remove(struct ofono_netreg *netreg)
g_free(nd);
}
static struct ofono_netreg_driver driver = {
static const struct ofono_netreg_driver driver = {
.name = RILMODEM,
.probe = ril_netreg_probe,
.remove = ril_netreg_remove,

View File

@ -1037,7 +1037,7 @@ static void ril_phonebook_remove(struct ofono_phonebook *pb)
g_free(pbd);
}
static struct ofono_phonebook_driver driver = {
static const struct ofono_phonebook_driver driver = {
.name = RILMODEM,
.probe = ril_phonebook_probe,
.remove = ril_phonebook_remove,

Some files were not shown because too many files have changed in this diff Show More