Diff between a3d31b58d2b743ac2f34ffc5d2f4ee1c4326b318 and 65214a997ed4453fc99fb39b59aaddc8f758e0b2

Changed Files

File Additions Deletions Status
src/device.c +6 -4 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index 53866de..3675616 100644
--- a/src/device.c
+++ b/src/device.c
@@ -857,9 +857,11 @@ static gboolean dev_property_get_adapter(const GDBusPropertyTable *property,
 	return TRUE;
 }
 
-static void profile_remove(struct btd_profile *profile,
-						struct btd_device *device)
+static void profile_remove(gpointer data, gpointer user_data)
 {
+	struct btd_profile *profile = data;
+	struct btd_device *device = user_data;
+
 	profile->device_remove(profile, device);
 }
 
@@ -885,7 +887,7 @@ int device_block(struct btd_device *device, gboolean update_only)
 	if (device->connected)
 		do_disconnect(device);
 
-	g_slist_foreach(device->profiles, (GFunc) profile_remove, device);
+	g_slist_foreach(device->profiles, profile_remove, device);
 	g_slist_free(device->profiles);
 	device->profiles = NULL;
 
@@ -2171,7 +2173,7 @@ void device_remove(struct btd_device *device, gboolean remove_stored)
 	if (remove_stored)
 		device_remove_stored(device);
 
-	g_slist_foreach(device->profiles, (GFunc) profile_remove, device);
+	g_slist_foreach(device->profiles, profile_remove, device);
 	g_slist_free(device->profiles);
 	device->profiles = NULL;