greybus: greybus_trace: Fix broken greybus ftrace
authorDavid Lin <dtwlin@google.com>
Sat, 19 Mar 2016 01:30:50 +0000 (18:30 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 22 Mar 2016 04:31:31 +0000 (00:31 -0400)
commit30b442b385c199b3f8e1df26fd6f0c07b61b32a2
tree436da730c924e4531c4a08174fa8681c0199ff56
parent309520ec93f7190c0c3d22d613825a0835a8600f
greybus: greybus_trace: Fix broken greybus ftrace

Enabling greybus ftrace event causes null pointer access due to
that gb_message to SVC has no Bundle. Fix it by handling this in
the trace header.

Testing Done:
$ echo 1 > /d/tracing/event/greybus/enable
 [002] ...1    54.504426: gb_message_send: greybus:1-svc op=0023 if_id=0 hd_id=0 l=0
 [002] ...1    54.504461: gb_host_device_send: greybus:greybus1 if_id=0 l=8

Signed-off-by: David Lin <dtwlin@google.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_trace.h