summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2012-08-31 12:50:53 +0200
committerJaska Uimonen <jaska.uimonen@intel.com>2013-01-24 09:29:35 +0200
commit62dd438cd86fa003b6a47aaf137f72d09efb5e10 (patch)
treef0ee231633fcfb0e5777f6fab406b4bc186da472
parent4ad72ea127b411a16d64f9128ac5c5d5fb555b05 (diff)
downloadpulseaudio-panda-62dd438cd86fa003b6a47aaf137f72d09efb5e10.tar.gz
pulseaudio-panda-62dd438cd86fa003b6a47aaf137f72d09efb5e10.tar.bz2
pulseaudio-panda-62dd438cd86fa003b6a47aaf137f72d09efb5e10.zip
bluetooth: Remove return value of bt_transport_config()
The function bt_transport_config() never fails so the code can be simplified by just removing the return value.
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index f5ccb779..ead78ccc 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1623,7 +1623,7 @@ static int add_source(struct userdata *u) {
return 0;
}
-static int bt_transport_config_a2dp(struct userdata *u) {
+static void bt_transport_config_a2dp(struct userdata *u) {
const pa_bluetooth_transport *t;
struct a2dp_info *a2dp = &u->a2dp;
a2dp_sbc_t *config;
@@ -1740,21 +1740,17 @@ static int bt_transport_config_a2dp(struct userdata *u) {
pa_log_info("SBC parameters:\n\tallocation=%u\n\tsubbands=%u\n\tblocks=%u\n\tbitpool=%u\n",
a2dp->sbc.allocation, a2dp->sbc.subbands, a2dp->sbc.blocks, a2dp->sbc.bitpool);
-
- return 0;
}
-static int bt_transport_config(struct userdata *u) {
+static void bt_transport_config(struct userdata *u) {
if (u->profile == PROFILE_HSP || u->profile == PROFILE_HFGW) {
u->read_block_size = u->read_link_mtu;
u->write_block_size = u->write_link_mtu;
u->sample_spec.format = PA_SAMPLE_S16LE;
u->sample_spec.channels = 1;
u->sample_spec.rate = 8000;
- return 0;
- }
-
- return bt_transport_config_a2dp(u);
+ } else
+ bt_transport_config_a2dp(u);
}
/* Run from main thread */
@@ -1788,7 +1784,9 @@ static int setup_bt(struct userdata *u) {
if (bt_transport_acquire(u, FALSE) < 0)
return -1;
- return bt_transport_config(u);
+ bt_transport_config(u);
+
+ return 0;
}
/* Run from main thread */