[PATCH v6 1/9] sim: add ofono_sim_get_modem method
Muhammad Asif <[email protected]> Fri, 28 Nov 2025 22:17:39 +0500
| Newsgroups | dev.linux.lists.ofono |
|---|---|
| Message-ID | <[email protected]> |
Align with the other ofono structures for fetching ofono_modem from atoms Signed-off-by: Muhammad Asif <[email protected]> --- include/sim.h | 2 ++ src/sim.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/sim.h b/include/sim.h index 84592fc9..c0fc364f 100644 --- a/include/sim.h +++ b/include/sim.h @@ -211,6 +211,8 @@ void ofono_sim_remove(struct ofono_sim *sim); =20 void ofono_sim_set_data(struct ofono_sim *sim, void *data); void *ofono_sim_get_data(struct ofono_sim *sim); +struct ofono_modem *ofono_sim_get_modem(struct ofono_sim *sim); + void ofono_sim_set_card_slot_count(struct ofono_sim *sim, unsigned int val= ); void ofono_sim_set_active_card_slot(struct ofono_sim *sim, =09=09=09=09=09unsigned int val); diff --git a/src/sim.c b/src/sim.c index dedb7d8d..cc33e864 100644 --- a/src/sim.c +++ b/src/sim.c @@ -3423,6 +3423,11 @@ void *ofono_sim_get_data(struct ofono_sim *sim) =09return sim->driver_data; } =20 +struct ofono_modem *ofono_sim_get_modem(struct ofono_sim *sim) +{ +=09return __ofono_atom_get_modem(sim->atom); +} + static ofono_bool_t is_valid_pin(const char *pin, unsigned int min, =09=09=09=09=09unsigned int max) { --=20 2.52.0