diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index e23c016..a4719d8 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
}
if (l != NULL) {
- if (a2dp_sep_get_lock(tmp))
+ if (tmp->locked)
goto failed;
setup->reconfigure = TRUE;
if (avdtp_close(session, tmp->stream, FALSE) < 0) {
return FALSE;
}
-gboolean a2dp_sep_get_lock(struct a2dp_sep *sep)
-{
- return sep->locked;
-}
-
struct avdtp_stream *a2dp_sep_get_stream(struct a2dp_sep *sep)
{
return sep->stream;
diff --git a/profiles/audio/a2dp.h b/profiles/audio/a2dp.h
index 6ad809c..2c49c5a 100644
--- a/profiles/audio/a2dp.h
+++ b/profiles/audio/a2dp.h
gboolean a2dp_sep_lock(struct a2dp_sep *sep, struct avdtp *session);
gboolean a2dp_sep_unlock(struct a2dp_sep *sep, struct avdtp *session);
-gboolean a2dp_sep_get_lock(struct a2dp_sep *sep);
gboolean a2dp_sep_is_playing(struct a2dp_sep *sep);
struct avdtp_stream *a2dp_sep_get_stream(struct a2dp_sep *sep);