aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-09 06:45:27 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-09 13:24:28 +0200
commit114e74d32232b8399b6517857389abc1b593382a (patch)
tree7475ad22f596901e089cc6b67e7acf90c24e390f
parent2e9254ac3f5a17495c4f71c62f85a7b4512b97c0 (diff)
wwan_perst: Warn if somebody failed to initialize us
-rw-r--r--firmware/libboard/qmod/source/wwan_perst.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/libboard/qmod/source/wwan_perst.c b/firmware/libboard/qmod/source/wwan_perst.c
index d0c6c3d..f16006f 100644
--- a/firmware/libboard/qmod/source/wwan_perst.c
+++ b/firmware/libboard/qmod/source/wwan_perst.c
@@ -27,6 +27,8 @@ static struct wwan_perst perst2 = {
};
#endif
+static int initialized = 0;
+
static void perst_tmr_cb(void *data)
{
struct wwan_perst *perst = data;
@@ -36,6 +38,11 @@ static void perst_tmr_cb(void *data)
static struct wwan_perst *get_perst_for_modem(int modem_nr)
{
+ if (!initialized) {
+ TRACE_ERROR("Somebody forgot to call wwan_perst_init()\r\n");
+ wwan_perst_init();
+ }
+
switch (modem_nr) {
#ifdef PIN_PERST1
case 1: