[PATCH 05/26] drivers: isdn: Move prototype declarations to headerfile capifunc.h from message.c

From: Rashika Kheria
Date: Fri Feb 07 2014 - 07:24:27 EST


Move prototype declaration of functions to header file
hardware/eicon/capifunc.h because they are used by more than one file.

This eliminates the following warnings in hardware/eicon/capifunc.c:
drivers/isdn/hardware/eicon/capifunc.c:113:6: warning: no previous prototype for âMapControllerâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:188:7: warning: no previous prototype for âTransmitBufferSetâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:195:7: warning: no previous prototype for âTransmitBufferGetâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:203:6: warning: no previous prototype for âTransmitBufferFreeâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:209:7: warning: no previous prototype for âReceiveBufferGetâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:217:6: warning: no previous prototype for âapi_remove_completeâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:225:6: warning: no previous prototype for âsendfâ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:1115:5: warning: no previous prototype for âfax_head_line_timeâ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
drivers/isdn/hardware/eicon/capifunc.h | 8 ++++++++
drivers/isdn/hardware/eicon/message.c | 12 +-----------
2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/isdn/hardware/eicon/capifunc.h b/drivers/isdn/hardware/eicon/capifunc.h
index e96c45b..fb7091e 100644
--- a/drivers/isdn/hardware/eicon/capifunc.h
+++ b/drivers/isdn/hardware/eicon/capifunc.h
@@ -36,5 +36,13 @@ typedef struct _diva_card {
*/
int init_capifunc(void);
void finit_capifunc(void);
+byte MapController(byte);
+void *TransmitBufferSet(APPL *appl, dword ref);
+void *TransmitBufferGet(APPL *appl, void *p);
+void TransmitBufferFree(APPL *appl, void *p);
+void *ReceiveBufferGet(APPL *appl, int Num);
+void api_remove_complete(void);
+void sendf(APPL *, word, dword, word, byte *, ...);
+int fax_head_line_time(char *buffer);

#endif /* __CAPIFUNC_H__ */
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index a82e542..062cb7b 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -32,6 +32,7 @@
#include "pc.h"
#include "capi20.h"
#include "divacapi.h"
+#include "capifunc.h"
#include "mdm_msg.h"
#include "divasync.h"

@@ -84,7 +85,6 @@ static void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out);
static void api_load_msg(API_SAVE *in, API_PARSE *out);

word api_remove_start(void);
-void api_remove_complete(void);

static void plci_remove(PLCI *);
static void diva_get_extended_adapter_features(DIVA_CAPI_ADAPTER *a);
@@ -224,20 +224,10 @@ static void diva_free_dma_descriptor(PLCI *plci, int nr);
/* external function prototypes */
/*------------------------------------------------------------------*/

-extern byte MapController(byte);
extern byte UnMapController(byte);
#define MapId(Id)(((Id) & 0xffffff00L) | MapController((byte)(Id)))
#define UnMapId(Id)(((Id) & 0xffffff00L) | UnMapController((byte)(Id)))

-void sendf(APPL *, word, dword, word, byte *, ...);
-void *TransmitBufferSet(APPL *appl, dword ref);
-void *TransmitBufferGet(APPL *appl, void *p);
-void TransmitBufferFree(APPL *appl, void *p);
-void *ReceiveBufferGet(APPL *appl, int Num);
-
-int fax_head_line_time(char *buffer);
-
-
/*------------------------------------------------------------------*/
/* Global data definitions */
/*------------------------------------------------------------------*/
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/