summaryrefslogtreecommitdiffstats
path: root/src/handsfree-audio.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vcgomes@gmail.com>2013-09-10 21:09:43 -0300
committerDenis Kenzior <denkenz@gmail.com>2013-09-12 13:17:40 -0500
commit6d08a47ec39dc291bbef05347203d5dc23a942d9 (patch)
treef51bec7cd5c947ab48fbfe5dbc89f46b2e20db36 /src/handsfree-audio.c
parente84bd27b997e8910fe1293b4c982c8fe21257248 (diff)
downloadofono-6d08a47ec39dc291bbef05347203d5dc23a942d9.tar.bz2
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.
Diffstat (limited to 'src/handsfree-audio.c')
-rw-r--r--src/handsfree-audio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
index e1894ef3..f39c49b1 100644
--- a/src/handsfree-audio.c
+++ b/src/handsfree-audio.c
@@ -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;