bluetooth: Create ports before card profiles

Both operations are currently independent and their order can therefore
be swapped.
This commit is contained in:
Mikel Astiz 2013-05-20 11:48:32 +02:00 committed by David Henningsson
parent c0a4f81123
commit 305f8c7af1

View file

@ -2252,6 +2252,8 @@ static int add_card(struct userdata *u) {
return -1; return -1;
} }
create_card_ports(u, data.ports);
PA_LLIST_FOREACH(uuid, device->uuids) { PA_LLIST_FOREACH(uuid, device->uuids) {
p = create_card_profile(u, uuid->uuid); p = create_card_profile(u, uuid->uuid);
@ -2268,8 +2270,6 @@ static int add_card(struct userdata *u) {
pa_assert(!pa_hashmap_isempty(data.profiles)); pa_assert(!pa_hashmap_isempty(data.profiles));
create_card_ports(u, data.ports);
p = pa_card_profile_new("off", _("Off"), sizeof(enum profile)); p = pa_card_profile_new("off", _("Off"), sizeof(enum profile));
p->available = PA_AVAILABLE_YES; p->available = PA_AVAILABLE_YES;
d = PA_CARD_PROFILE_DATA(p); d = PA_CARD_PROFILE_DATA(p);