aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/mdtv/smsdvb.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-05-22 17:04:36 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:20:30 -0400
commiteae55660fc4a7f17f0f87458d8ada2b51b1833c1 (patch)
tree10b91e1c1cf2bb24b87d24d9cca10edf221833fa /drivers/media/mdtv/smsdvb.c
parent159ed4bbc394bb3e547eb64fdd3a59141ced131a (diff)
V4L/DVB (8268): sms1xxx: usb cleanup
Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/mdtv/smsdvb.c')
-rw-r--r--drivers/media/mdtv/smsdvb.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/media/mdtv/smsdvb.c b/drivers/media/mdtv/smsdvb.c
index 166f218ca5c1..7a1e6c33b12c 100644
--- a/drivers/media/mdtv/smsdvb.c
+++ b/drivers/media/mdtv/smsdvb.c
@@ -375,3 +375,30 @@ adapter_error:
375 return rc; 375 return rc;
376} 376}
377 377
378int smsdvb_register(void)
379{
380 int rc;
381
382 INIT_LIST_HEAD(&g_smsdvb_clients);
383 kmutex_init(&g_smsdvb_clientslock);
384
385 rc = smscore_register_hotplug(smsdvb_hotplug);
386
387 printk(KERN_INFO "%s\n", __FUNCTION__);
388
389 return rc;
390}
391
392void smsdvb_unregister(void)
393{
394 smscore_unregister_hotplug(smsdvb_hotplug);
395
396 kmutex_lock(&g_smsdvb_clientslock);
397
398 while (!list_empty(&g_smsdvb_clients))
399 smsdvb_unregister_client((smsdvb_client_t*) g_smsdvb_clients.next);
400
401 kmutex_unlock(&g_smsdvb_clientslock);
402
403}
404