handsfree-audio: Don't register if no defer_setup

If the kernel doesn't support defer_setup for SCO, we shouldn't allow
cards to be registered, because in that case we won't be able to
properly send the file descriptor to the Agent.
This commit is contained in:
Vinicius Costa Gomes 2013-09-10 21:09:43 -03:00 committed by Denis Kenzior
parent e84bd27b99
commit 6d08a47ec3
1 changed files with 3 additions and 0 deletions

View File

@ -816,6 +816,9 @@ int ofono_handsfree_card_driver_register(
{
DBG("driver: %p", d);
if (defer_setup == 0)
return -ENOSYS;
if (d->probe == NULL)
return -EINVAL;