diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-08-14 15:38:42 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-14 16:31:34 -0500 |
commit | 6119c08c28072aa298f9178f937bfb03bbfe3b4d (patch) | |
tree | c5aefdbb2618f4f73ef9dadeb3e5882c5c06a835 | |
parent | 9020b1dc7e7483a6f205167b7b73408ea752de4e (diff) | |
download | ofono-6119c08c28072aa298f9178f937bfb03bbfe3b4d.tar.bz2 |
Rework ofono_modem_remove_atom
Change to ofono_atom_free since the atom now carries all necessary
information about the modem it is attached to
-rw-r--r-- | src/modem.c | 6 | ||||
-rw-r--r-- | src/ofono.h | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/modem.c b/src/modem.c index eb200ea1..2c0d0e60 100644 --- a/src/modem.c +++ b/src/modem.c @@ -180,11 +180,9 @@ struct ofono_atom *__ofono_modem_find_atom(struct ofono_modem *modem, return NULL; } -void __ofono_modem_remove_atom(struct ofono_modem *modem, - struct ofono_atom *atom) +void __ofono_atom_free(struct ofono_atom *atom) { - if (modem == NULL) - return; + struct ofono_modem *modem = atom->modem; modem->atoms = g_slist_remove(modem->atoms, atom); diff --git a/src/ofono.h b/src/ofono.h index 34b1fdaa..0c03a2fb 100644 --- a/src/ofono.h +++ b/src/ofono.h @@ -123,8 +123,7 @@ void __ofono_atom_register(struct ofono_atom *atom, void (*unregister)(struct ofono_atom *)); void __ofono_atom_unregister(struct ofono_atom *atom); -void __ofono_modem_remove_atom(struct ofono_modem *modem, - struct ofono_atom *atom); +void __ofono_atom_free(struct ofono_atom *atom); #include <ofono/call-barring.h> #include <ofono/call-forwarding.h> |