Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363282
b: refs/heads/master
c: 135114a
h: refs/heads/master
v: v3
  • Loading branch information
Erik Gilling authored and Greg Kroah-Hartman committed Mar 4, 2013
1 parent 952aa4d commit 4f96088
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbd523905bac49da0643332e4eb0f2202e2acd06
refs/heads/master: 135114a566c15dfe44fb8ca31e42dd215d627383
36 changes: 17 additions & 19 deletions trunk/drivers/staging/android/sw_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,6 @@ static int sw_sync_pt_compare(struct sync_pt *a, struct sync_pt *b)
return sw_sync_cmp(pt_a->value, pt_b->value);
}

static void sw_sync_print_obj(struct seq_file *s,
struct sync_timeline *sync_timeline)
{
struct sw_sync_timeline *obj = (struct sw_sync_timeline *)sync_timeline;

seq_printf(s, "%d", obj->value);
}

static void sw_sync_print_pt(struct seq_file *s, struct 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;

seq_printf(s, "%d / %d", pt->value, obj->value);
}

static int sw_sync_fill_driver_data(struct sync_pt *sync_pt,
void *data, int size)
{
Expand All @@ -102,14 +85,29 @@ static int sw_sync_fill_driver_data(struct sync_pt *sync_pt,
return sizeof(pt->value);
}

static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,
char *str, int size)
{
struct sw_sync_timeline *timeline =
(struct sw_sync_timeline *)sync_timeline;
snprintf(str, size, "%d", timeline->value);
}

static void sw_sync_pt_value_str(struct sync_pt *sync_pt,
char *str, int size)
{
struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
snprintf(str, size, "%d", pt->value);
}

struct sync_timeline_ops sw_sync_timeline_ops = {
.driver_name = "sw_sync",
.dup = sw_sync_pt_dup,
.has_signaled = sw_sync_pt_has_signaled,
.compare = sw_sync_pt_compare,
.print_obj = sw_sync_print_obj,
.print_pt = sw_sync_print_pt,
.fill_driver_data = sw_sync_fill_driver_data,
.timeline_value_str = sw_sync_timeline_value_str,
.pt_value_str = sw_sync_pt_value_str,
};


Expand Down

0 comments on commit 4f96088

Please sign in to comment.