From: Kristen Carlson Accardi <kristen@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 2/2] atmodem: call sim_ready_notify when epev is received
Date: Wed, 25 Aug 2010 04:23:12 -0700 [thread overview]
Message-ID: <1282735392-5283-3-git-send-email-kristen@linux.intel.com> (raw)
In-Reply-To: <1282735392-5283-1-git-send-email-kristen@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]
---
drivers/atmodem/sim.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index 21bc933..44ecc1a 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -537,13 +537,16 @@ static gboolean at_epev_unregister(gpointer user_data)
static void at_epev_notify(GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
- struct sim_data *sd = cbd->user;
+ struct ofono_sim *sim = cbd->user;
+ struct sim_data *sd = ofono_sim_get_data(sim);
ofono_sim_lock_unlock_cb_t cb = cbd->cb;
struct ofono_error error = { .type = OFONO_ERROR_TYPE_NO_ERROR };
if (sd->epev_source)
return;
+ ofono_sim_ready_notify(sim);
+
cb(&error, cbd->data);
sd->epev_source = g_timeout_add(0, at_epev_unregister, sd);
@@ -553,7 +556,8 @@ static void at_pin_send_cb(gboolean ok, GAtResult *result,
gpointer user_data)
{
struct cb_data *cbd = user_data;
- struct sim_data *sd = cbd->user;
+ struct ofono_sim *sim = cbd->user;
+ struct sim_data *sd = ofono_sim_get_data(sim);
ofono_sim_lock_unlock_cb_t cb = cbd->cb;
struct ofono_error error;
@@ -590,15 +594,15 @@ static void at_lock_unlock_cb(gboolean ok, GAtResult *result,
static void at_pin_send(struct ofono_sim *sim, const char *passwd,
ofono_sim_lock_unlock_cb_t cb, void *data)
{
- struct sim_data *sd = ofono_sim_get_data(sim);
struct cb_data *cbd = cb_data_new(cb, data);
+ struct sim_data *sd = ofono_sim_get_data(sim);
char buf[64];
int ret;
if (!cbd)
goto error;
- cbd->user = sd;
+ cbd->user = sim;
snprintf(buf, sizeof(buf), "AT+CPIN=\"%s\"", passwd);
--
1.7.2.1
prev parent reply other threads:[~2010-08-25 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-25 11:23 [PATCH 0/2] ofono_sim_ready_notify Kristen Carlson Accardi
2010-08-25 11:23 ` [PATCH 1/2] sim: add ofono_sim_ready_notify() support Kristen Carlson Accardi
2010-08-26 12:17 ` Pekka Pessi
2010-08-26 15:18 ` Denis Kenzior
2010-08-26 15:49 ` Pekka Pessi
2010-08-26 16:10 ` Denis Kenzior
2010-08-25 11:23 ` Kristen Carlson Accardi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1282735392-5283-3-git-send-email-kristen@linux.intel.com \
--to=kristen@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.