diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 3516640..fefa0e8 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
struct avctp_state_callback {
avctp_state_cb cb;
struct audio_device *dev;
- void *user_data;
unsigned int id;
};
if (cb->dev && cb->dev != dev)
continue;
- cb->cb(dev, old_state, new_state, cb->user_data);
+ cb->cb(dev, old_state, new_state);
}
switch (new_state) {
func, user_data);
}
-unsigned int avctp_add_state_cb(struct audio_device *dev, avctp_state_cb cb,
- void *user_data)
+unsigned int avctp_add_state_cb(struct audio_device *dev, avctp_state_cb cb)
{
struct avctp_state_callback *state_cb;
static unsigned int id = 0;
state_cb = g_new(struct avctp_state_callback, 1);
state_cb->cb = cb;
state_cb->dev = dev;
- state_cb->user_data = user_data;
state_cb->id = ++id;
callbacks = g_slist_append(callbacks, state_cb);
diff --git a/profiles/audio/avctp.h b/profiles/audio/avctp.h
index 7d05572..5e905fc 100644
--- a/profiles/audio/avctp.h
+++ b/profiles/audio/avctp.h
typedef void (*avctp_state_cb) (struct audio_device *dev,
avctp_state_t old_state,
- avctp_state_t new_state,
- void *user_data);
+ avctp_state_t new_state);
typedef size_t (*avctp_control_pdu_cb) (struct avctp *session,
uint8_t transaction, uint8_t *code,
uint8_t *operands, size_t operand_count,
void *user_data);
-unsigned int avctp_add_state_cb(struct audio_device *dev, avctp_state_cb cb,
- void *user_data);
+unsigned int avctp_add_state_cb(struct audio_device *dev, avctp_state_cb cb);
gboolean avctp_remove_state_cb(unsigned int id);
int avctp_register(struct btd_adapter *adapter, gboolean master);
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 6965fe2..85da0c0 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
}
static void state_changed(struct audio_device *dev, avctp_state_t old_state,
- avctp_state_t new_state, void *user_data)
+ avctp_state_t new_state)
{
struct avrcp_server *server;
struct avrcp *session;
servers = g_slist_append(servers, server);
if (!avctp_id)
- avctp_id = avctp_add_state_cb(NULL, state_changed, NULL);
+ avctp_id = avctp_add_state_cb(NULL, state_changed);
return 0;
}
diff --git a/profiles/audio/control.c b/profiles/audio/control.c
index b50e890..7e4ed42 100644
--- a/profiles/audio/control.c
+++ b/profiles/audio/control.c
};
static void state_changed(struct audio_device *dev, avctp_state_t old_state,
- avctp_state_t new_state, void *user_data)
+ avctp_state_t new_state)
{
DBusConnection *conn = btd_get_dbus_connection();
struct control *control = dev->control;
control_update(control, uuids);
- control->avctp_id = avctp_add_state_cb(dev, state_changed, NULL);
+ control->avctp_id = avctp_add_state_cb(dev, state_changed);
return control;
}
diff --git a/profiles/audio/device.c b/profiles/audio/device.c
index bd62434..bca4bbd 100644
--- a/profiles/audio/device.c
+++ b/profiles/audio/device.c
}
}
-static void device_avctp_cb(struct audio_device *dev,
- avctp_state_t old_state,
- avctp_state_t new_state,
- void *user_data)
+static void device_avctp_cb(struct audio_device *dev, avctp_state_t old_state,
+ avctp_state_t new_state)
{
if (!dev->control)
return;
sink_callback_id = sink_add_state_cb(device_sink_cb, NULL);
dev->priv->avdtp_callback_id = avdtp_add_state_cb(dev, device_avdtp_cb);
- dev->priv->avctp_callback_id = avctp_add_state_cb(dev, device_avctp_cb,
- NULL);
+ dev->priv->avctp_callback_id = avctp_add_state_cb(dev, device_avctp_cb);
return dev;
}