summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-02-12 12:02:39 -0600
committerDenis Kenzior <denkenz@gmail.com>2010-02-12 12:02:39 -0600
commitd5577a393dd74b95b2185427a5366648edbc0183 (patch)
tree78d4f97a64d1e67084ed1f0404d3d5300f162d39
parent35f83a71295ed76148ab057cdd81bd096bb785f5 (diff)
downloadofono-d5577a393dd74b95b2185427a5366648edbc0183.tar.bz2
Style: No need for this to be a function
-rw-r--r--plugins/hfp.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/hfp.c b/plugins/hfp.c
index 9191af2c..c07c4f40 100644
--- a/plugins/hfp.c
+++ b/plugins/hfp.c
@@ -804,24 +804,21 @@ done:
dbus_message_unref(reply);
}
-static int hfp_connect_ofono_handsfree(struct ofono_modem *modem)
+/* power up hardware */
+static int hfp_enable(struct ofono_modem *modem)
{
struct hfp_data *data = ofono_modem_get_data(modem);
+ int status;
- DBG("Connect to bluetooth daemon");
+ DBG("%p", modem);
- return send_method_call_with_reply(BLUEZ_SERVICE, data->handsfree_path,
+ status = send_method_call_with_reply(BLUEZ_SERVICE,
+ data->handsfree_path,
BLUEZ_GATEWAY_INTERFACE, "Connect",
hfp_connect_reply, modem, 15,
DBUS_TYPE_INVALID);
-}
-/* power up hardware */
-static int hfp_enable(struct ofono_modem *modem)
-{
- DBG("%p", modem);
-
- if (hfp_connect_ofono_handsfree(modem) < 0)
+ if (status < 0)
return -EINVAL;
return -EINPROGRESS;