From a72115510a2444d641bdd6a2ce444b3537a34c2a Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 19 Jan 2011 12:34:41 -0200 Subject: [PATCH] huawei: do not query sim state on pre_sim Sim state is already known after modem is enabled and there's no need to query it again. Before this patch, query_sim_state() was called upon huawei_enable() and huawei_pre_sim(). Both functions might call notify_sim_state() with a valid state. Hence we could eventually end up sending AT+CFUN=5 command twice. --- plugins/huawei.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/huawei.c b/plugins/huawei.c index b4b74367..09a7a3eb 100644 --- a/plugins/huawei.c +++ b/plugins/huawei.c @@ -621,9 +621,6 @@ static void huawei_pre_sim(struct ofono_modem *modem) ofono_devinfo_create(modem, 0, "atmodem", data->pcui); data->sim = ofono_sim_create(modem, OFONO_VENDOR_HUAWEI, "atmodem", data->pcui); - - data->sim_poll_count = 0; - query_sim_state(modem); } static void huawei_post_sim(struct ofono_modem *modem)