summaryrefslogtreecommitdiff
path: root/drivers/staging/android/sync_debug.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2016-05-31 19:59:00 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-18 04:17:40 (GMT)
commitd21858fdb3269e98aa62d522efec7ce2865368e6 (patch)
tree0387c620036407f195c0189a1c26ec1c9c3fed0f /drivers/staging/android/sync_debug.c
parentdcc280803e8a803643b6d12b2f35df608623c7fd (diff)
downloadlinux-d21858fdb3269e98aa62d522efec7ce2865368e6.tar.xz
staging/android: remove sw_sync.[ch] files
We can glue the sw_sync file operations directly on the sync framework without the need to pass through sw_sync wrappers. It only builds sw_sync debugfs file support if CONFIG_SW_SYNC is enabled. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/sync_debug.c')
-rw-r--r--drivers/staging/android/sync_debug.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index e207a4d..dc85d5f 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -27,7 +27,11 @@
#include <linux/anon_inodes.h>
#include <linux/time64.h>
#include <linux/sync_file.h>
-#include "sw_sync.h"
+#include <linux/types.h>
+#include <linux/kconfig.h>
+
+#include "uapi/sw_sync.h"
+#include "sync.h"
#ifdef CONFIG_DEBUG_FS
@@ -200,6 +204,7 @@ static const struct file_operations sync_info_debugfs_fops = {
.release = single_release,
};
+#if IS_ENABLED(CONFIG_SW_SYNC)
/*
* *WARNING*
*
@@ -214,7 +219,7 @@ static int sw_sync_debugfs_open(struct inode *inode, struct file *file)
get_task_comm(task_comm, current);
- obj = sw_sync_timeline_create(task_comm);
+ obj = sync_timeline_create(sizeof(*obj), "sw_sync", task_comm);
if (!obj)
return -ENOMEM;
@@ -248,7 +253,7 @@ static long sw_sync_ioctl_create_fence(struct sync_timeline *obj,
goto err;
}
- fence = sw_sync_pt_create(obj, data.value);
+ fence = sync_pt_create(obj, sizeof(*fence), data.value);
if (!fence) {
err = -ENOMEM;
goto err;
@@ -284,7 +289,7 @@ static long sw_sync_ioctl_inc(struct sync_timeline *obj, unsigned long arg)
if (copy_from_user(&value, (void __user *)arg, sizeof(value)))
return -EFAULT;
- sw_sync_timeline_inc(obj, value);
+ sync_timeline_signal(obj, value);
return 0;
}
@@ -312,14 +317,18 @@ static const struct file_operations sw_sync_debugfs_fops = {
.unlocked_ioctl = sw_sync_ioctl,
.compat_ioctl = sw_sync_ioctl,
};
+#endif
static __init int sync_debugfs_init(void)
{
dbgfs = debugfs_create_dir("sync", NULL);
debugfs_create_file("info", 0444, dbgfs, NULL, &sync_info_debugfs_fops);
+
+#if IS_ENABLED(CONFIG_SW_SYNC)
debugfs_create_file("sw_sync", 0644, dbgfs, NULL,
&sw_sync_debugfs_fops);
+#endif
return 0;
}