diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-05-22 18:04:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 07:20:30 -0300 |
commit | eae55660fc4a7f17f0f87458d8ada2b51b1833c1 (patch) | |
tree | 10b91e1c1cf2bb24b87d24d9cca10edf221833fa /drivers/media/mdtv/smsdvb.c | |
parent | 159ed4bbc394bb3e547eb64fdd3a59141ced131a (diff) | |
download | lwn-eae55660fc4a7f17f0f87458d8ada2b51b1833c1.tar.gz lwn-eae55660fc4a7f17f0f87458d8ada2b51b1833c1.zip |
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.c | 27 |
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: return rc; } +int smsdvb_register(void) +{ + int rc; + + INIT_LIST_HEAD(&g_smsdvb_clients); + kmutex_init(&g_smsdvb_clientslock); + + rc = smscore_register_hotplug(smsdvb_hotplug); + + printk(KERN_INFO "%s\n", __FUNCTION__); + + return rc; +} + +void smsdvb_unregister(void) +{ + smscore_unregister_hotplug(smsdvb_hotplug); + + kmutex_lock(&g_smsdvb_clientslock); + + while (!list_empty(&g_smsdvb_clients)) + smsdvb_unregister_client((smsdvb_client_t*) g_smsdvb_clients.next); + + kmutex_unlock(&g_smsdvb_clientslock); + +} + |