Skip to contentSkip to conversation

atmodem: Remove at_pin_send_puk_cb, and use at_pin_send_cb instead.

PATCH Superseded Marit Henriksen 2 participants 2 messages Nov 4, 2010

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 atmodem: Remove at_pin_send_puk_cb, and use at_pin_send_cb instead.

From: Marit <[email protected]>

When adding the use of pin event *EPEV also to at_pin_send_puk_cb, it becomes identical to at_pin_send_cb, and can be removed.
---
Thank you for your patience.

 drivers/atmodem/sim.c |   34 +---------------------------------
 1 files changed, 1 insertions(+), 33 deletions(-)
drivers/atmodem/sim.c +1 -33
index 94658f2..9cfdc65 100644
@@ -647,38 +647,6 @@ error:
 	CALLBACK_WITH_FAILURE(cb, data);
 }
 
-static void at_pin_send_puk_cb(gboolean ok, GAtResult *result,
-				gpointer user_data)
-{
-	struct cb_data *cbd = user_data;
-	struct sim_data *sd = cbd->user;
-	ofono_sim_lock_unlock_cb_t cb = cbd->cb;
-	struct ofono_error error;
-
-	decode_at_error(&error, g_at_result_final_response(result));
-
-	if (!ok)
-		goto done;
-
-	switch (sd->vendor) {
-	case OFONO_VENDOR_IFX:
-		/*
-		 * On the IFX modem, AT+CPIN? can return READY too
-		 * early and so use +XSIM notification to detect
-		 * the ready state of the SIM.
-		 */
-		sd->ready_id = g_at_chat_register(sd->chat, "+XSIM",
-							at_xsim_notify,
-							FALSE, cbd, g_free);
-		return;
-	}
-
-done:
-	cb(&error, cbd->data);
-
-	g_free(cbd);
-}
-
 static void at_pin_send_puk(struct ofono_sim *sim, const char *puk,
 				const char *passwd,
 				ofono_sim_lock_unlock_cb_t cb, void *data)
@@ -696,7 +664,7 @@ static void at_pin_send_puk(struct ofono_sim *sim, const char *puk,
 	snprintf(buf, sizeof(buf), "AT+CPIN=\"%s\",\"%s\"", puk, passwd);
 
 	ret = g_at_chat_send(sd->chat, buf, none_prefix,
-				at_pin_send_puk_cb, cbd, NULL);
+				at_pin_send_cb, cbd, NULL);
 
 	memset(buf, 0, sizeof(buf));
 
Signature · 1 line
1.7.0.4
#1 lore raw

Hi Marit,

Quoted 1 line

From: Marit <[email protected]>

except that I can not merge it like this. The From: address line should contain the full name and not an abbreviation.

Regards

Marcel