summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/staging/android/sw_sync.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/staging/android/sw_sync.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/staging/android/sw_sync.c')
-rw-r--r--kernel/drivers/staging/android/sw_sync.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/kernel/drivers/staging/android/sw_sync.c b/kernel/drivers/staging/android/sw_sync.c
index c90838d36..c4ff1679e 100644
--- a/kernel/drivers/staging/android/sw_sync.c
+++ b/kernel/drivers/staging/android/sw_sync.c
@@ -15,11 +15,11 @@
*/
#include <linux/kernel.h>
+#include <linux/init.h>
#include <linux/export.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
-#include <linux/module.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
@@ -145,7 +145,7 @@ static int sw_sync_open(struct inode *inode, struct file *file)
get_task_comm(task_comm, current);
obj = sw_sync_timeline_create(task_comm);
- if (obj == NULL)
+ if (!obj)
return -ENOMEM;
file->private_data = obj;
@@ -179,14 +179,14 @@ static long sw_sync_ioctl_create_fence(struct sw_sync_timeline *obj,
}
pt = sw_sync_pt_create(obj, data.value);
- if (pt == NULL) {
+ if (!pt) {
err = -ENOMEM;
goto err;
}
data.name[sizeof(data.name) - 1] = '\0';
fence = sync_fence_create(data.name, pt);
- if (fence == NULL) {
+ if (!fence) {
sync_pt_free(pt);
err = -ENOMEM;
goto err;
@@ -255,13 +255,6 @@ static int __init sw_sync_device_init(void)
{
return misc_register(&sw_sync_dev);
}
-
-static void __exit sw_sync_device_remove(void)
-{
- misc_deregister(&sw_sync_dev);
-}
-
-module_init(sw_sync_device_init);
-module_exit(sw_sync_device_remove);
+device_initcall(sw_sync_device_init);
#endif /* CONFIG_SW_SYNC_USER */