Commit f4833a51 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mark Brown

ASoC: trace: fix printing jack name

After a change to the snd_jack structure, the 'name' member
is no longer available in all configurations, which results in a
build failure in the tracing code:

include/trace/events/asoc.h: In function 'trace_event_raw_event_snd_soc_jack_report':
include/trace/events/asoc.h:240:32: error: 'struct snd_jack' has no member named 'name'

The name field is normally initialized from the card shortname and
the jack "id" field:

        snprintf(jack->name, sizeof(jack->name), "%s %s",
                 card->shortname, jack->id);

This changes the tracing output to just contain the 'id' by
itself, which slightly changes the output format but avoids the
link error and is hopefully still enough to see what is going on.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: fe0d128c ("ALSA: jack: Allow building the jack layer without input device")
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 92e963f5
......@@ -231,13 +231,13 @@ TRACE_EVENT(snd_soc_jack_report,
TP_ARGS(jack, mask, val),
TP_STRUCT__entry(
__string( name, jack->jack->name )
__string( name, jack->jack->id )
__field( int, mask )
__field( int, val )
),
TP_fast_assign(
__assign_str(name, jack->jack->name);
__assign_str(name, jack->jack->id);
__entry->mask = mask;
__entry->val = val;
),
......@@ -253,12 +253,12 @@ TRACE_EVENT(snd_soc_jack_notify,
TP_ARGS(jack, val),
TP_STRUCT__entry(
__string( name, jack->jack->name )
__string( name, jack->jack->id )
__field( int, val )
),
TP_fast_assign(
__assign_str(name, jack->jack->name);
__assign_str(name, jack->jack->id);
__entry->val = val;
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment