diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index e4921b5..bd73572 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
struct avdtp_state_callback {
avdtp_session_state_cb cb;
struct audio_device *dev;
- void *user_data;
unsigned int id;
};
if (dev != cb->dev)
continue;
- cb->cb(dev, session, old_state, new_state, cb->user_data);
+ cb->cb(dev, session, old_state, new_state);
}
}
}
unsigned int avdtp_add_state_cb(struct audio_device *dev,
- avdtp_session_state_cb cb, void *user_data)
+ avdtp_session_state_cb cb)
{
struct avdtp_state_callback *state_cb;
static unsigned int id = 0;
state_cb = g_new(struct avdtp_state_callback, 1);
state_cb->cb = cb;
state_cb->dev = dev;
- state_cb->user_data = user_data;
state_cb->id = ++id;
avdtp_callbacks = g_slist_append(avdtp_callbacks, state_cb);
diff --git a/profiles/audio/avdtp.h b/profiles/audio/avdtp.h
index 437ee03..4e6a597 100644
--- a/profiles/audio/avdtp.h
+++ b/profiles/audio/avdtp.h
typedef void (*avdtp_session_state_cb) (struct audio_device *dev,
struct avdtp *session,
avdtp_session_state_t old_state,
- avdtp_session_state_t new_state,
- void *user_data);
+ avdtp_session_state_t new_state);
typedef void (*avdtp_stream_state_cb) (struct avdtp_stream *stream,
avdtp_state_t old_state,
struct avdtp_stream *stream);
unsigned int avdtp_add_state_cb(struct audio_device *dev,
- avdtp_session_state_cb cb, void *user_data);
+ avdtp_session_state_cb cb);
gboolean avdtp_remove_state_cb(unsigned int id);
diff --git a/profiles/audio/device.c b/profiles/audio/device.c
index 67ff697..8d5e10f 100644
--- a/profiles/audio/device.c
+++ b/profiles/audio/device.c
static void device_avdtp_cb(struct audio_device *dev, struct avdtp *session,
avdtp_session_state_t old_state,
- avdtp_session_state_t new_state,
- void *user_data)
+ avdtp_session_state_t new_state)
{
if (!dev->control)
return;
if (sink_callback_id == 0)
sink_callback_id = sink_add_state_cb(device_sink_cb, NULL);
- dev->priv->avdtp_callback_id = avdtp_add_state_cb(dev, device_avdtp_cb,
- NULL);
+ dev->priv->avdtp_callback_id = avdtp_add_state_cb(dev, device_avdtp_cb);
if (avctp_callback_id == 0)
avctp_callback_id = avctp_add_state_cb(device_avctp_cb, NULL);
diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index de15eff..2bbd9ee 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
static void avdtp_state_callback(struct audio_device *dev,
struct avdtp *session,
avdtp_session_state_t old_state,
- avdtp_session_state_t new_state,
- void *user_data)
+ avdtp_session_state_t new_state)
{
struct sink *sink = dev->sink;
sink->dev = dev;
- sink->avdtp_callback_id = avdtp_add_state_cb(dev, avdtp_state_callback,
- NULL);
+ sink->avdtp_callback_id = avdtp_add_state_cb(dev, avdtp_state_callback);
return sink;
}
diff --git a/profiles/audio/source.c b/profiles/audio/source.c
index 64fbe15..147a92c 100644
--- a/profiles/audio/source.c
+++ b/profiles/audio/source.c
static void avdtp_state_callback(struct audio_device *dev,
struct avdtp *session,
avdtp_session_state_t old_state,
- avdtp_session_state_t new_state,
- void *user_data)
+ avdtp_session_state_t new_state)
{
struct source *source = dev->source;
source->dev = dev;
source->avdtp_callback_id = avdtp_add_state_cb(dev,
- avdtp_state_callback,
- NULL);
+ avdtp_state_callback);
return source;
}