forked from alinefr/rtbth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtbth_core_main.c
78 lines (65 loc) · 2.49 KB
/
rtbth_core_main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
*************************************************************************
* Ralink Technology Corporation
* 5F., No. 5, Taiyuan 1st St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2012, Ralink Technology Corporation
*
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
*************************************************************************/
#include <linux/init.h>
#include <linux/module.h>
#include "include/rtbth_dbg.h"
#include "rtbt_osabl.h"
#include "rtbth_3298.h"
#include "rtbt_ctrl.h"
#define VERSION "3.9.4"
MODULE_AUTHOR("Ralink Tech.");
MODULE_DESCRIPTION("Support for Ralink Bluetooth RT3290 Cards");
MODULE_SUPPORTED_DEVICE("Ralink Bluetooth RT3290 cards");
MODULE_LICENSE("GPL");
MODULE_VERSION(VERSION);
static struct rtbt_dev_entry *rtbt_pci_dev_list = NULL;
static int __init rtbth_init(void)
{
struct rtbt_dev_entry *ent;
DebugPrint(TRACE, DBG_INIT, "--->%s()\n", __FUNCTION__);
#ifdef RT3298
ent = rtbt_3298_init();
#endif // RT3298 //
if (ent)
{
rtbt_pci_dev_list = ent;
ral_os_register(rtbt_pci_dev_list);
}
DebugPrint(TRACE, DBG_INIT, "<---%s()\n", __FUNCTION__);
return 0;
}
static void __exit rtbth_exit(void)
{
DebugPrint(TRACE, DBG_INIT,"--->%s()\n", __FUNCTION__);
if (rtbt_pci_dev_list)
ral_os_unregister(rtbt_pci_dev_list);
#ifdef RT3298
rtbt_3298_exit();
#endif // RT3298 //
DebugPrint(TRACE, DBG_INIT,"<---%s()\n", __FUNCTION__);
}
module_init(rtbth_init);
module_exit(rtbth_exit);