Skip to content

Commit

Permalink
V4L/DVB (13397): firedtv: move remote control workqueue handling into…
Browse files Browse the repository at this point in the history
… 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: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Stefan Richter authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent b921d92 commit 56411f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/dvb/firewire/firedtv-1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -220,6 +221,7 @@ static int node_probe(struct device *dev)
fdtv_unregister_rc(fdtv);
fail_free:
kfree(fdtv);

return err;
}

Expand All @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/media/dvb/firewire/firedtv-rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/workqueue.h>

#include "firedtv.h"

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 56411f4

Please sign in to comment.