mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-30 00:07:56 +03:00
wwan_perst: Warn if somebody failed to initialize us
This commit is contained in:
@@ -27,6 +27,8 @@ static struct wwan_perst perst2 = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int initialized = 0;
|
||||||
|
|
||||||
static void perst_tmr_cb(void *data)
|
static void perst_tmr_cb(void *data)
|
||||||
{
|
{
|
||||||
struct wwan_perst *perst = 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)
|
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) {
|
switch (modem_nr) {
|
||||||
#ifdef PIN_PERST1
|
#ifdef PIN_PERST1
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user