All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
To: ofono@ofono.org
Subject: [PATCH 3/9] atmodem: use ofono_call initializer
Date: Tue, 01 Feb 2011 15:12:44 -0200	[thread overview]
Message-ID: <1296580370-2823-3-git-send-email-lucas.demarchi@profusion.mobi> (raw)
In-Reply-To: <1296580370-2823-1-git-send-email-lucas.demarchi@profusion.mobi>

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

---
 drivers/atmodem/atutil.c    |    4 +++-
 drivers/atmodem/voicecall.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/atmodem/atutil.c b/drivers/atmodem/atutil.c
index a55b3f5..01f5460 100644
--- a/drivers/atmodem/atutil.c
+++ b/drivers/atmodem/atutil.c
@@ -132,10 +132,12 @@ GSList *at_util_parse_clcc(GAtResult *result)
 		if (g_at_result_iter_next_string(&iter, &str))
 			g_at_result_iter_next_number(&iter, &number_type);
 
-		call = g_try_new0(struct ofono_call, 1);
+		call = g_try_new(struct ofono_call, 1);
 		if (call == NULL)
 			break;
 
+		ofono_call_init(call);
+
 		call->id = id;
 		call->direction = dir;
 		call->status = status;
diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index a64269d..583e037 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -112,10 +112,12 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
 	struct ofono_call *call;
 
 	/* Generate a call structure for the waiting call */
-	call = g_try_new0(struct ofono_call, 1);
+	call = g_try_new(struct ofono_call, 1);
 	if (call == NULL)
 		return NULL;
 
+	ofono_call_init(call);
+
 	call->id = ofono_voicecall_get_next_callid(vc);
 	call->type = type;
 	call->direction = direction;
-- 
1.7.4


  parent reply	other threads:[~2011-02-01 17:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 17:12 [PATCH 1/9] include: define initializer for ofono_call Lucas De Marchi
2011-02-01 17:12 ` [PATCH 2/9] common: implement " Lucas De Marchi
2011-02-01 17:12 ` Lucas De Marchi [this message]
2011-02-01 17:12 ` [PATCH 4/9] calypsomodem: use ofono_call initializer Lucas De Marchi
2011-02-01 17:12 ` [PATCH 5/9] hfpmodem: " Lucas De Marchi
2011-02-01 17:12 ` [PATCH 6/9] huaweimodem: " Lucas De Marchi
2011-02-01 17:12 ` [PATCH 7/9] ifxmodem: " Lucas De Marchi
2011-02-01 17:12 ` [PATCH 8/9] isimodem: " Lucas De Marchi
2011-02-01 17:12 ` [PATCH 9/9] stemodem: " Lucas De Marchi
2011-02-01 17:32 ` [PATCH 1/9] include: define initializer for ofono_call Marcel Holtmann

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=1296580370-2823-3-git-send-email-lucas.demarchi@profusion.mobi \
    --to=lucas.demarchi@profusion.mobi \
    --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.