Commit fc238b37 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] drivers/isdn/sc/: proper prototypes

Add proper prototypes in a header file for global code under
drivers/isdn/sc/.

Since the GNU C compiler is now able do tell us that caller and callee
disagreed about the number of arguments of setup_buffers(), this patch
also fixes this bug.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b19a8f04
......@@ -26,7 +26,9 @@
#include <linux/timer.h>
#include <linux/time.h>
#include <linux/isdnif.h>
#include <linux/irqreturn.h>
#include "message.h"
#include "scioc.h"
/*
* Amount of time to wait for a reset to complete
......@@ -98,4 +100,32 @@ typedef struct {
spinlock_t lock; /* local lock */
} board;
extern board *sc_adapter[];
extern int cinst;
void memcpy_toshmem(int card, void *dest, const void *src, size_t n);
void memcpy_fromshmem(int card, void *dest, const void *src, size_t n);
int get_card_from_id(int driver);
int indicate_status(int card, int event, ulong Channel, char *Data);
irqreturn_t interrupt_handler(int interrupt, void *cardptr);
int sndpkt(int devId, int channel, struct sk_buff *data);
void rcvpkt(int card, RspMessage *rcvmsg);
int command(isdn_ctrl *cmd);
int reset(int card);
int startproc(int card);
int send_and_receive(int card, unsigned int procid, unsigned char type,
unsigned char class, unsigned char code,
unsigned char link, unsigned char data_len,
unsigned char *data, RspMessage *mesgdata, int timeout);
void flushreadfifo (int card);
int sendmessage(int card, unsigned int procid, unsigned int type,
unsigned int class, unsigned int code, unsigned int link,
unsigned int data_len, unsigned int *data);
int receivemessage(int card, RspMessage *rspmsg);
int sc_ioctl(int card, scs_ioctl *data);
int setup_buffers(int card, int c);
void check_reset(unsigned long data);
void check_phystat(unsigned long data);
#endif /* CARD_H */
......@@ -31,19 +31,6 @@ static int setl2(int card, unsigned long arg);
static int setl3(int card, unsigned long arg);
static int acceptb(int card, unsigned long channel);
extern int cinst;
extern board *sc_adapter[];
extern int sc_ioctl(int, scs_ioctl *);
extern int setup_buffers(int, int, unsigned int);
extern int indicate_status(int, int,ulong,char*);
extern void check_reset(unsigned long);
extern int send_and_receive(int, unsigned int, unsigned char, unsigned char,
unsigned char, unsigned char, unsigned char, unsigned char *,
RspMessage *, int);
extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int *);
#ifdef DEBUG
/*
* Translate command codes to strings
......@@ -208,7 +195,7 @@ static int answer(int card, unsigned long channel)
return -ENODEV;
}
if(setup_buffers(card, channel+1, BUFFER_SIZE)) {
if(setup_buffers(card, channel+1)) {
hangup(card, channel+1);
return -ENOBUFS;
}
......@@ -297,7 +284,7 @@ static int acceptb(int card, unsigned long channel)
return -ENODEV;
}
if(setup_buffers(card, channel+1, BUFFER_SIZE))
if(setup_buffers(card, channel+1))
{
hangup(card, channel+1);
return -ENOBUFS;
......
......@@ -20,9 +20,6 @@
#include "message.h"
#include "card.h"
extern int cinst;
extern board *sc_adapter[];
#ifdef DEBUG
static char *events[] = { "ISDN_STAT_STAVAIL",
"ISDN_STAT_ICALL",
......
......@@ -35,12 +35,6 @@ module_param_array(irq, int, NULL, 0);
module_param_array(ram, int, NULL, 0);
module_param(do_reset, bool, 0);
extern irqreturn_t interrupt_handler(int, void *);
extern int sndpkt(int, int, int, struct sk_buff *);
extern int command(isdn_ctrl *);
extern int indicate_status(int, int, ulong, char*);
extern int reset(int);
static int identify_board(unsigned long, unsigned int);
static int __init sc_init(void)
......
......@@ -21,16 +21,6 @@
#include "card.h"
#include <linux/interrupt.h>
extern int indicate_status(int, int, ulong, char *);
extern void check_phystat(unsigned long);
extern int receivemessage(int, RspMessage *);
extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int *);
extern void rcvpkt(int, RspMessage *);
extern int cinst;
extern board *sc_adapter[];
static int get_card_from_irq(int irq)
{
int i;
......
......@@ -12,16 +12,6 @@
#include "card.h"
#include "scioc.h"
extern int indicate_status(int, int, unsigned long, char *);
extern int startproc(int);
extern int reset(int);
extern int send_and_receive(int, unsigned int, unsigned char,unsigned char,
unsigned char,unsigned char,
unsigned char, unsigned char *, RspMessage *, int);
extern board *sc_adapter[];
static int GetStatus(int card, boardInfo *);
/*
......
......@@ -22,16 +22,6 @@
#include "message.h"
#include "card.h"
extern board *sc_adapter[];
extern unsigned int cinst;
/*
* Obligatory function prototypes
*/
extern int indicate_status(int,ulong,char*);
extern int scm_command(isdn_ctrl *);
/*
* receive a message from the board
*/
......
......@@ -20,16 +20,6 @@
#include "message.h"
#include "card.h"
extern board *sc_adapter[];
extern unsigned int cinst;
extern int get_card_from_id(int);
extern int indicate_status(int, int,ulong, char*);
extern void memcpy_toshmem(int, void *, const void *, size_t);
extern void memcpy_fromshmem(int, void *, const void *, size_t);
extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int *);
int sndpkt(int devId, int channel, struct sk_buff *data)
{
LLData ReqLnkWrite;
......
#ifndef __ISDN_SC_SCIOC_H__
#define __ISDN_SC_SCIOC_H__
/*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
......@@ -103,3 +106,6 @@ typedef struct {
POTInfo potsinfo;
} info;
} boardInfo;
#endif /* __ISDN_SC_SCIOC_H__ */
......@@ -21,12 +21,6 @@
#include "hardware.h"
#include "card.h"
/*
* Main adapter array
*/
extern board *sc_adapter[];
extern int cinst;
/*
*
*/
......
......@@ -20,14 +20,6 @@
#include "message.h"
#include "card.h"
extern board *sc_adapter[];
extern void flushreadfifo(int);
extern int startproc(int);
extern int indicate_status(int, int, unsigned long, char *);
extern int sendmessage(int, unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int, unsigned int *);
/*
* Write the proper values into the I/O ports following a reset
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment