modem: Only find registered atoms

Change the semantics of __ofono_modem_find_atom to only return
registered atoms.
This commit is contained in:
Denis Kenzior 2011-03-30 13:30:50 -05:00
parent 3e799ce8b4
commit 767d297263
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ struct ofono_atom *__ofono_modem_find_atom(struct ofono_modem *modem,
for (l = modem->atoms; l; l = l->next) {
atom = l->data;
if (atom->type == type)
if (atom->type == type && atom->unregister != NULL)
return atom;
}