]> code.delx.au - pulseaudio/commitdiff
device-port: Remove pa_device_port_hashmap_free()
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 12 Feb 2013 19:36:54 +0000 (21:36 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 15 Feb 2013 23:13:57 +0000 (01:13 +0200)
src/modules/bluetooth/module-bluetooth-device.c
src/pulsecore/card.c
src/pulsecore/device-port.c
src/pulsecore/device-port.h
src/pulsecore/sink.c
src/pulsecore/source.c

index 33b2afa643e95310ad2acd6a115c4b150a84af24..f6f6da616097eef8f0e70d70815866b7f7cf45a3 100644 (file)
@@ -2432,7 +2432,7 @@ static pa_hook_result_t uuid_added_cb(pa_bluetooth_discovery *y, const struct pa
 
     pa_card_add_ports(u->card, new_ports);
 
-    pa_device_port_hashmap_free(new_ports);
+    pa_hashmap_free(new_ports, (pa_free_cb_t) pa_device_port_unref);
 
     return PA_HOOK_OK;
 }
index 560e36e10021087accd04a4772ed05633d170ff3..c3bb7eb587729c76752a3beb34b28745ad7ec2f8 100644 (file)
@@ -129,7 +129,7 @@ void pa_card_new_data_done(pa_card_new_data *data) {
         pa_hashmap_free(data->profiles, (pa_free_cb_t) pa_card_profile_free);
 
     if (data->ports)
-        pa_device_port_hashmap_free(data->ports);
+        pa_hashmap_free(data->ports, (pa_free_cb_t) pa_device_port_unref);
 
     pa_xfree(data->name);
     pa_xfree(data->active_profile);
@@ -237,7 +237,7 @@ void pa_card_free(pa_card *c) {
     pa_assert(pa_idxset_isempty(c->sources));
     pa_idxset_free(c->sources, NULL, NULL);
 
-    pa_device_port_hashmap_free(c->ports);
+    pa_hashmap_free(c->ports, (pa_free_cb_t) pa_device_port_unref);
 
     if (c->profiles)
         pa_hashmap_free(c->profiles, (pa_free_cb_t) pa_card_profile_free);
index 5c7a5bb54d8c3345d4a84a1a0af09216ff3abf3f..e0f95600dd90fbae338a65a859e123e3e2cb1170 100644 (file)
@@ -89,12 +89,6 @@ pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *des
     return p;
 }
 
-void pa_device_port_hashmap_free(pa_hashmap *h) {
-    pa_assert(h);
-
-    pa_hashmap_free(h, (pa_free_cb_t) pa_device_port_unref);
-}
-
 void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) {
     uint32_t state;
     pa_core *core;
index cea00e68148060ea91c85f9c3708dcb4382772be..40306f5b1794c9f8d396358ec8161ad66b5929e1 100644 (file)
@@ -65,8 +65,6 @@ PA_DECLARE_PUBLIC_CLASS(pa_device_port);
 
 pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *description, size_t extra);
 
-void pa_device_port_hashmap_free(pa_hashmap *h);
-
 /* The port's available status has changed */
 void pa_device_port_set_available(pa_device_port *p, pa_port_available_t available);
 
index 171072e17335803ad20c297d0e06b8d098a2d163..d8fb5fea4d40b6667e8aef8b63a1585b082675da 100644 (file)
@@ -142,7 +142,7 @@ void pa_sink_new_data_done(pa_sink_new_data *data) {
     pa_proplist_free(data->proplist);
 
     if (data->ports)
-        pa_device_port_hashmap_free(data->ports);
+        pa_hashmap_free(data->ports, (pa_free_cb_t) pa_device_port_unref);
 
     pa_xfree(data->name);
     pa_xfree(data->active_port);
@@ -743,7 +743,7 @@ static void sink_free(pa_object *o) {
         pa_proplist_free(s->proplist);
 
     if (s->ports)
-        pa_device_port_hashmap_free(s->ports);
+        pa_hashmap_free(s->ports, (pa_free_cb_t) pa_device_port_unref);
 
     pa_xfree(s);
 }
index 5c1213703d1f6781c1b80685c5707372c3f851a5..f72d66701bfadf386189ff7ff9d332cce5632678 100644 (file)
@@ -133,7 +133,7 @@ void pa_source_new_data_done(pa_source_new_data *data) {
     pa_proplist_free(data->proplist);
 
     if (data->ports)
-        pa_device_port_hashmap_free(data->ports);
+        pa_hashmap_free(data->ports, (pa_free_cb_t) pa_device_port_unref);
 
     pa_xfree(data->name);
     pa_xfree(data->active_port);
@@ -672,7 +672,7 @@ static void source_free(pa_object *o) {
         pa_proplist_free(s->proplist);
 
     if (s->ports)
-        pa_device_port_hashmap_free(s->ports);
+        pa_hashmap_free(s->ports, (pa_free_cb_t) pa_device_port_unref);
 
     pa_xfree(s);
 }