diff options
author | Alex Elder <elder@linaro.org> | 2016-06-03 15:55:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-06-03 17:03:23 -0700 |
commit | 4f9c5c0bbb9fb4715ca01cd28ba04a3117a9be6f (patch) | |
tree | f17ad47a4c802f9aa0d56be4f4c5e372b5b561e3 /drivers/staging/greybus/bundle.c | |
parent | 6879dbf15e866565cde7591337c2fcca7440ab6f (diff) |
greybus: tracing: define bundle traces
Define a new gb_bundle trace point event class, used to trace events
associated with the bundle abstraction. Define four basic trace
points for this--creation time, drop of last reference, before
adding it to its interface and when removed when its interface
is destroyed.
Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/bundle.c')
-rw-r--r-- | drivers/staging/greybus/bundle.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index e7c00b679636..c1c3d67a0279 100644 --- a/drivers/staging/greybus/bundle.c +++ b/drivers/staging/greybus/bundle.c @@ -8,6 +8,7 @@ */ #include "greybus.h" +#include "greybus_trace.h" static ssize_t bundle_class_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -82,6 +83,8 @@ static void gb_bundle_release(struct device *dev) { struct gb_bundle *bundle = to_gb_bundle(dev); + trace_gb_bundle_release(bundle); + kfree(bundle->state); kfree(bundle->cport_desc); kfree(bundle); @@ -136,6 +139,8 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, list_add(&bundle->links, &intf->bundles); + trace_gb_bundle_create(bundle); + return bundle; } @@ -149,6 +154,8 @@ int gb_bundle_add(struct gb_bundle *bundle) return ret; } + trace_gb_bundle_add(bundle); + return 0; } @@ -157,6 +164,8 @@ int gb_bundle_add(struct gb_bundle *bundle) */ void gb_bundle_destroy(struct gb_bundle *bundle) { + trace_gb_bundle_destroy(bundle); + if (device_is_registered(&bundle->dev)) device_del(&bundle->dev); |