git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
isdn
/
hysdn
/
hycapi.c
diff --git
a/drivers/isdn/hysdn/hycapi.c
b/drivers/isdn/hysdn/hycapi.c
index
f5fb795
..
b2ae4ec
100644
(file)
--- a/
drivers/isdn/hysdn/hycapi.c
+++ b/
drivers/isdn/hysdn/hycapi.c
@@
-11,7
+11,6
@@
*/
#include <linux/module.h>
*/
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/signal.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/signal.h>
#include <linux/kernel.h>
#include <linux/skbuff.h>
@@
-32,7
+31,7
@@
static char hycapi_revision[]="$Revision: 1.8.6.4 $";
unsigned int hycapi_enable = 0xffffffff;
static char hycapi_revision[]="$Revision: 1.8.6.4 $";
unsigned int hycapi_enable = 0xffffffff;
-
MODULE_PARM(hycapi_enable, "i"
);
+
module_param(hycapi_enable, uint, 0
);
typedef struct _hycapi_appl {
unsigned int ctrl_mask;
typedef struct _hycapi_appl {
unsigned int ctrl_mask;
@@
-42,6
+41,8
@@
typedef struct _hycapi_appl {
static hycapi_appl hycapi_applications[CAPI_MAXAPPL];
static hycapi_appl hycapi_applications[CAPI_MAXAPPL];
+static u16 hycapi_send_message(struct capi_ctr *ctrl, struct sk_buff *skb);
+
static inline int _hycapi_appCheck(int app_id, int ctrl_no)
{
if((ctrl_no <= 0) || (ctrl_no > CAPI_MAXCONTR) || (app_id <= 0) ||
static inline int _hycapi_appCheck(int app_id, int ctrl_no)
{
if((ctrl_no <= 0) || (ctrl_no > CAPI_MAXCONTR) || (app_id <= 0) ||
@@
-57,7
+58,7
@@
static inline int _hycapi_appCheck(int app_id, int ctrl_no)
Kernel-Capi callback reset_ctr
******************************/
Kernel-Capi callback reset_ctr
******************************/
-void
+static void
hycapi_reset_ctr(struct capi_ctr *ctrl)
{
hycapictrl_info *cinfo = ctrl->driverdata;
hycapi_reset_ctr(struct capi_ctr *ctrl)
{
hycapictrl_info *cinfo = ctrl->driverdata;
@@
-73,7
+74,7
@@
hycapi_reset_ctr(struct capi_ctr *ctrl)
Kernel-Capi callback remove_ctr
******************************/
Kernel-Capi callback remove_ctr
******************************/
-void
+static void
hycapi_remove_ctr(struct capi_ctr *ctrl)
{
int i;
hycapi_remove_ctr(struct capi_ctr *ctrl)
{
int i;
@@
-96,7
+97,7
@@
hycapi_remove_ctr(struct capi_ctr *ctrl)
}
}
detach_capi_ctr(ctrl);
}
}
detach_capi_ctr(ctrl);
- ctrl->driverdata =
0
;
+ ctrl->driverdata =
NULL
;
kfree(card->hyctrlinfo);
kfree(card->hyctrlinfo);
@@
-215,7
+216,7
@@
Error-checking is done for CAPI-compliance.
The application is recorded in the internal list.
*************************************************************/
The application is recorded in the internal list.
*************************************************************/
-void
+static void
hycapi_register_appl(struct capi_ctr *ctrl, __u16 appl,
capi_register_params *rp)
{
hycapi_register_appl(struct capi_ctr *ctrl, __u16 appl,
capi_register_params *rp)
{
@@
-246,8
+247,6
@@
hycapi_register_appl(struct capi_ctr *ctrl, __u16 appl,
rp->level3cnt = MaxLogicalConnections;
memcpy(&hycapi_applications[appl-1].rp,
rp, sizeof(capi_register_params));
rp->level3cnt = MaxLogicalConnections;
memcpy(&hycapi_applications[appl-1].rp,
rp, sizeof(capi_register_params));
-
-/* MOD_INC_USE_COUNT; */
}
/*********************************************************************
}
/*********************************************************************
@@
-293,7
+292,7
@@
Release the application from the internal list an remove it's
registration at controller-level
******************************************************************/
registration at controller-level
******************************************************************/
-void
+static void
hycapi_release_appl(struct capi_ctr *ctrl, __u16 appl)
{
int chk;
hycapi_release_appl(struct capi_ctr *ctrl, __u16 appl)
{
int chk;
@@
-311,7
+310,6
@@
hycapi_release_appl(struct capi_ctr *ctrl, __u16 appl)
{
hycapi_release_internal(ctrl, appl);
}
{
hycapi_release_internal(ctrl, appl);
}
-/* MOD_DEC_USE_COUNT; */
}
}
@@
-367,7
+365,7
@@
firmware-releases that do not check the MsgLen-Indication!
***************************************************************/
***************************************************************/
-u16 hycapi_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
+
static
u16 hycapi_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
{
__u16 appl_id;
int _len, _len2;
{
__u16 appl_id;
int _len, _len2;
@@
-440,8
+438,8
@@
Informations provided in the /proc/capi-entries.
*********************************************************************/
*********************************************************************/
-int hycapi_read_proc(char *page, char **start, off_t off,
- int count, int *eof, struct capi_ctr *ctrl)
+
static
int hycapi_read_proc(char *page, char **start, off_t off,
+
int count, int *eof, struct capi_ctr *ctrl)
{
hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
hysdn_card *card = cinfo->card;
{
hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
hysdn_card *card = cinfo->card;
@@
-488,7
+486,7
@@
on capi-interface registration.
**************************************************************/
**************************************************************/
-int hycapi_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
+
static
int hycapi_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
{
#ifdef HYCAPI_PRINTFNAMES
printk(KERN_NOTICE "hycapi_load_firmware\n");
{
#ifdef HYCAPI_PRINTFNAMES
printk(KERN_NOTICE "hycapi_load_firmware\n");
@@
-497,7
+495,7
@@
int hycapi_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
}
}
-char *hycapi_procinfo(struct capi_ctr *ctrl)
+
static
char *hycapi_procinfo(struct capi_ctr *ctrl)
{
hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
#ifdef HYCAPI_PRINTFNAMES
{
hycapictrl_info *cinfo = (hycapictrl_info *)(ctrl->driverdata);
#ifdef HYCAPI_PRINTFNAMES
@@
-525,7
+523,7
@@
New nccis are created if necessary.
*******************************************************************/
void
*******************************************************************/
void
-hycapi_rx_capipkt(hysdn_card * card, u
char * buf, word
len)
+hycapi_rx_capipkt(hysdn_card * card, u
nsigned char *buf, unsigned short
len)
{
struct sk_buff *skb;
hycapictrl_info *cinfo = card->hyctrlinfo;
{
struct sk_buff *skb;
hycapictrl_info *cinfo = card->hyctrlinfo;
@@
-678,7
+676,7
@@
attach the capi-driver to the kernel-capi.
***********************************************************/
***********************************************************/
-int hycapi_init()
+int hycapi_init(
void
)
{
int i;
for(i=0;i<CAPI_MAXAPPL;i++) {
{
int i;
for(i=0;i<CAPI_MAXAPPL;i++) {
@@
-747,12
+745,11
@@
hycapi_capi_create(hysdn_card *card)
return 1;
}
if (!card->hyctrlinfo) {
return 1;
}
if (!card->hyctrlinfo) {
- cinfo =
(hycapictrl_info *) km
alloc(sizeof(hycapictrl_info), GFP_ATOMIC);
+ cinfo =
kz
alloc(sizeof(hycapictrl_info), GFP_ATOMIC);
if (!cinfo) {
printk(KERN_WARNING "HYSDN: no memory for capi-ctrl.\n");
return -ENOMEM;
}
if (!cinfo) {
printk(KERN_WARNING "HYSDN: no memory for capi-ctrl.\n");
return -ENOMEM;
}
- memset(cinfo, 0, sizeof(hycapictrl_info));
card->hyctrlinfo = cinfo;
cinfo->card = card;
spin_lock_init(&cinfo->lock);
card->hyctrlinfo = cinfo;
cinfo->card = card;
spin_lock_init(&cinfo->lock);