diff options
author | Alex Elder <elder@linaro.org> | 2016-05-23 23:05:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-26 22:37:19 -0700 |
commit | 1f79046bd73abf5cc1dc5ad1f817a7851496ae0c (patch) | |
tree | acb42fd27c399724261b7924af69fbfadf9ab9c7 /drivers/staging/greybus/hd.c | |
parent | df732546ce127e3bd8d55f4f7073aebd4482438c (diff) |
greybus: tracing: fix hd traces
Currently there are two trace points defined for the Greybus host
device structure. One records information when a message gets sent,
and another when it gets received. Neither of these is really a
host device event.
We have trace points defined for messages that dump information
about all sent and received messages. As a result, the information
about sending messages over a host is redundant, and can go away.
(Note that the message traces may need a little refinement so they
produce all desired information.)
Instead of these trace points, define some that are directly
related to the host device abstraction: when one is created,
added, deleted, or released (destroyed). These do not require
a CPort ID or payload size, so eliminate those two parameters
from the host device trace point prototype. Change the trace
information recorded for a host device to be just a subset of
interesting fields in a host device.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/hd.c')
-rw-r--r-- | drivers/staging/greybus/hd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c index fba6d766209f..f64b592187c0 100644 --- a/drivers/staging/greybus/hd.c +++ b/drivers/staging/greybus/hd.c @@ -11,7 +11,7 @@ #include <linux/slab.h> #include "greybus.h" - +#include "greybus_trace.h" static struct ida gb_hd_bus_id_map; @@ -87,6 +87,8 @@ void gb_hd_cport_release(struct gb_host_device *hd, u16 cport_id) } ida_simple_remove(&hd->cport_id_map, cport_id); + + trace_gb_hd_release(hd); } static void gb_hd_release(struct device *dev) @@ -168,6 +170,8 @@ struct gb_host_device *gb_hd_create(struct gb_hd_driver *driver, device_initialize(&hd->dev); dev_set_name(&hd->dev, "greybus%d", hd->bus_id); + trace_gb_hd_create(hd); + hd->svc = gb_svc_create(hd); if (!hd->svc) { dev_err(&hd->dev, "failed to create svc\n"); @@ -193,12 +197,16 @@ int gb_hd_add(struct gb_host_device *hd) return ret; } + trace_gb_hd_add(hd); + return 0; } EXPORT_SYMBOL_GPL(gb_hd_add); void gb_hd_del(struct gb_host_device *hd) { + trace_gb_hd_del(hd); + /* * Tear down the svc and flush any on-going hotplug processing before * removing the remaining interfaces. |