aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2009-11-08 16:28:45 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:41 -0500
commit56411f49f69140b97e259256b99dc276f2b2b427 (patch)
tree04b8c84ca48e71f36fed5cae293d3b70e5e28b58 /drivers/media/dvb
parentb921d929f4a012be3e809fbb1ff1e8e6c0751c06 (diff)
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: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/firewire/firedtv-1394.c5
-rw-r--r--drivers/media/dvb/firewire/firedtv-rc.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/dvb/firewire/firedtv-1394.c b/drivers/media/dvb/firewire/firedtv-1394.c
index 2b6eeeab5b25..a2e3841f8ee9 100644
--- a/drivers/media/dvb/firewire/firedtv-1394.c
+++ b/drivers/media/dvb/firewire/firedtv-1394.c
@@ -212,6 +212,7 @@ static int node_probe(struct device *dev)
212 goto fail; 212 goto fail;
213 213
214 avc_register_remote_control(fdtv); 214 avc_register_remote_control(fdtv);
215
215 return 0; 216 return 0;
216fail: 217fail:
217 spin_lock_irq(&node_list_lock); 218 spin_lock_irq(&node_list_lock);
@@ -220,6 +221,7 @@ fail:
220 fdtv_unregister_rc(fdtv); 221 fdtv_unregister_rc(fdtv);
221fail_free: 222fail_free:
222 kfree(fdtv); 223 kfree(fdtv);
224
223 return err; 225 return err;
224} 226}
225 227
@@ -233,10 +235,9 @@ static int node_remove(struct device *dev)
233 list_del(&fdtv->list); 235 list_del(&fdtv->list);
234 spin_unlock_irq(&node_list_lock); 236 spin_unlock_irq(&node_list_lock);
235 237
236 cancel_work_sync(&fdtv->remote_ctrl_work);
237 fdtv_unregister_rc(fdtv); 238 fdtv_unregister_rc(fdtv);
238
239 kfree(fdtv); 239 kfree(fdtv);
240
240 return 0; 241 return 0;
241} 242}
242 243
diff --git a/drivers/media/dvb/firewire/firedtv-rc.c b/drivers/media/dvb/firewire/firedtv-rc.c
index 27bca2e283df..599d66e5843d 100644
--- a/drivers/media/dvb/firewire/firedtv-rc.c
+++ b/drivers/media/dvb/firewire/firedtv-rc.c
@@ -14,6 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/workqueue.h>
17 18
18#include "firedtv.h" 19#include "firedtv.h"
19 20
@@ -163,6 +164,7 @@ fail:
163 164
164void fdtv_unregister_rc(struct firedtv *fdtv) 165void fdtv_unregister_rc(struct firedtv *fdtv)
165{ 166{
167 cancel_work_sync(&fdtv->remote_ctrl_work);
166 kfree(fdtv->remote_ctrl_dev->keycode); 168 kfree(fdtv->remote_ctrl_dev->keycode);
167 input_unregister_device(fdtv->remote_ctrl_dev); 169 input_unregister_device(fdtv->remote_ctrl_dev);
168} 170}