Commit 56411f49 authored by Stefan Richter's avatar Stefan Richter Committed by Mauro Carvalho Chehab

V4L/DVB (13397): firedtv: move remote control workqueue handling into rc source file

Preparation for the port of firedtv to the firewire-core kernel API:
Canceling of the remote control workqueue job is factored into
firedtv-rc.c.  Plus trivial whitespace change.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b921d929
......@@ -212,6 +212,7 @@ static int node_probe(struct device *dev)
goto fail;
avc_register_remote_control(fdtv);
return 0;
fail:
spin_lock_irq(&node_list_lock);
......@@ -220,6 +221,7 @@ static int node_probe(struct device *dev)
fdtv_unregister_rc(fdtv);
fail_free:
kfree(fdtv);
return err;
}
......@@ -233,10 +235,9 @@ static int node_remove(struct device *dev)
list_del(&fdtv->list);
spin_unlock_irq(&node_list_lock);
cancel_work_sync(&fdtv->remote_ctrl_work);
fdtv_unregister_rc(fdtv);
kfree(fdtv);
return 0;
}
......
......@@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include "firedtv.h"
......@@ -163,6 +164,7 @@ int fdtv_register_rc(struct firedtv *fdtv, struct device *dev)
void fdtv_unregister_rc(struct firedtv *fdtv)
{
cancel_work_sync(&fdtv->remote_ctrl_work);
kfree(fdtv->remote_ctrl_dev->keycode);
input_unregister_device(fdtv->remote_ctrl_dev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment