Skip to contentSkip to conversation

lte.h: added ofono_lte_get_modem global function

PATCH In review Giacinto Cifelli 2 participants 3 messages Sep 23, 2018 – Sep 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lte.h: added ofono_lte_get_modem global function

this function can be used in the drivers to query the functions ofono_modem_get_* to retrieve modem-specific properties

---
 include/lte.h | 2 ++
 1 file changed, 2 insertions(+)
include/lte.h +2 -0
index ef84ab99..0f2501c0 100644
@@ -61,6 +61,8 @@ void ofono_lte_set_data(struct ofono_lte *lte, void *data);
 
 void *ofono_lte_get_data(const struct ofono_lte *lte);
 
+struct ofono_modem *ofono_lte_get_modem(const struct ofono_lte *lte);
+
 #ifdef __cplusplus
 }
 #endif
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 src/lte.c: added implementation for ofono_lte_get_modem

---
 src/lte.c | 6 ++++++
 1 file changed, 6 insertions(+)
src/lte.c +6 -0
index e16d9aab..4b14f6e8 100644
@@ -373,3 +373,9 @@ void *ofono_lte_get_data(const struct ofono_lte *lte)
 {
 	return lte->driver_data;
 }
+
+struct ofono_modem *ofono_lte_get_modem(const struct ofono_lte *lte)
+{
+	return __ofono_atom_get_modem(lte->atom);
+}
+
Signature · 1 line
2.17.1
#2 lore raw
In reply to Giacinto Cifelli

Hi Giacinto,

Quoted 6 lines · Giacinto Cifelli

this function can be used in the drivers to query the functions ofono_modem_get_* to retrieve modem-specific properties

---
  include/lte.h | 2 ++
  1 file changed, 2 insertions(+)

Both applied after tweaking the commit description.

Regards,
-Denis