aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/sw_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/android/sw_sync.c')
-rw-r--r--drivers/staging/android/sw_sync.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index a76db3ff87cb..c90838d36953 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -48,11 +48,11 @@ EXPORT_SYMBOL(sw_sync_pt_create);
static struct sync_pt *sw_sync_pt_dup(struct sync_pt *sync_pt)
{
- struct sw_sync_pt *pt = (struct sw_sync_pt *) sync_pt;
+ struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
struct sw_sync_timeline *obj =
(struct sw_sync_timeline *)sync_pt_parent(sync_pt);
- return (struct sync_pt *) sw_sync_pt_create(obj, pt->value);
+ return (struct sync_pt *)sw_sync_pt_create(obj, pt->value);
}
static int sw_sync_pt_has_signaled(struct sync_pt *sync_pt)
@@ -94,9 +94,10 @@ static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,
}
static void sw_sync_pt_value_str(struct sync_pt *sync_pt,
- char *str, int size)
+ char *str, int size)
{
struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
+
snprintf(str, size, "%d", pt->value);
}
@@ -110,7 +111,6 @@ static struct sync_timeline_ops sw_sync_timeline_ops = {
.pt_value_str = sw_sync_pt_value_str,
};
-
struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
{
struct sw_sync_timeline *obj = (struct sw_sync_timeline *)
@@ -156,6 +156,7 @@ static int sw_sync_open(struct inode *inode, struct file *file)
static int sw_sync_release(struct inode *inode, struct file *file)
{
struct sw_sync_timeline *obj = file->private_data;
+
sync_timeline_destroy(&obj->obj);
return 0;
}