All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ril_sofia3gr: ril power off process extended
@ 2016-05-18 14:32 Samrat Guha Niyogi
  2016-05-18 17:16 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Samrat Guha Niyogi @ 2016-05-18 14:32 UTC (permalink / raw)
  To: ofono

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

---
 plugins/ril_sofia3gr.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/plugins/ril_sofia3gr.c b/plugins/ril_sofia3gr.c
index 8631454..ce29d13 100644
--- a/plugins/ril_sofia3gr.c
+++ b/plugins/ril_sofia3gr.c
@@ -255,14 +255,24 @@ static int ril_enable(struct ofono_modem *modem)
 	return -EINPROGRESS;
 }
 
+static void ril_send_power_off_cb(struct ril_msg *message, gpointer user_data)
+{
+	struct ofono_modem *modem = (struct ofono_modem *) user_data;
+	struct ril_data *rd = ofono_modem_get_data(modem);
+
+	g_ril_unref(rd->ril);
+
+	ofono_modem_set_powered(modem, FALSE);
+}
+
 static int ril_disable(struct ofono_modem *modem)
 {
 	struct ril_data *rd = ofono_modem_get_data(modem);
 
 	DBG("%p", modem);
-	ril_send_power(rd->ril, FALSE, NULL, NULL, NULL);
+	ril_send_power(rd->ril, FALSE, ril_send_power_off_cb, modem, NULL);
 
-	return 0;
+	return -EINPROGRESS;
 }
 
 static struct ofono_modem_driver ril_driver = {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ril_sofia3gr: ril power off process extended
  2016-05-18 14:32 [PATCH] ril_sofia3gr: ril power off process extended Samrat Guha Niyogi
@ 2016-05-18 17:16 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2016-05-18 17:16 UTC (permalink / raw)
  To: ofono

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

Hi Samrat,

On 05/18/2016 09:32 AM, Samrat Guha Niyogi wrote:
> ---
>   plugins/ril_sofia3gr.c | 14 ++++++++++++--
>   1 file changed, 12 insertions(+), 2 deletions(-)
>

Applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-18 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 14:32 [PATCH] ril_sofia3gr: ril power off process extended Samrat Guha Niyogi
2016-05-18 17:16 ` Denis Kenzior

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.