aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclinkmp.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-28 05:14:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:29 -0400
commitce9f9f73af0338a680d66288cbf0efe4b900e78b (patch)
treeafe570de87736c72014c1a618bbad81e07f89957 /drivers/char/synclinkmp.c
parent0fab6de09c71a976e5d765e1ff548b14be385153 (diff)
char: make functions static in synclinkmp.c
All were forward declared with static. Fixes sparse warnings: drivers/char/synclinkmp.c:1476:5: warning: symbol 'read_proc' was not declared. Should it be static? drivers/char/synclinkmp.c:2027:5: warning: symbol 'bh_action' was not declared. Should it be static? drivers/char/synclinkmp.c:2058:6: warning: symbol 'bh_handler' was not declared. Should it be static? drivers/char/synclinkmp.c:2103:6: warning: symbol 'bh_receive' was not declared. Should it be static? drivers/char/synclinkmp.c:2112:6: warning: symbol 'bh_transmit' was not declared. Should it be static? drivers/char/synclinkmp.c:2124:6: warning: symbol 'bh_status' was not declared. Should it be static? drivers/char/synclinkmp.c:2136:6: warning: symbol 'isr_timer' was not declared. Should it be static? drivers/char/synclinkmp.c:2162:6: warning: symbol 'isr_rxint' was not declared. Should it be static? drivers/char/synclinkmp.c:2221:6: warning: symbol 'isr_rxrdy' was not declared. Should it be static? drivers/char/synclinkmp.c:2351:6: warning: symbol 'isr_txint' was not declared. Should it be static? drivers/char/synclinkmp.c:2379:6: warning: symbol 'isr_txrdy' was not declared. Should it be static? drivers/char/synclinkmp.c:2410:6: warning: symbol 'isr_rxdmaok' was not declared. Should it be static? drivers/char/synclinkmp.c:2427:6: warning: symbol 'isr_rxdmaerror' was not declared. Should it be static? drivers/char/synclinkmp.c:2445:6: warning: symbol 'isr_txdmaok' was not declared. Should it be static? drivers/char/synclinkmp.c:2463:6: warning: symbol 'isr_txdmaerror' was not declared. Should it be static? drivers/char/synclinkmp.c:2480:6: warning: symbol 'isr_io_pin' was not declared. Should it be static? drivers/char/synclinkmp.c:3420:5: warning: symbol 'alloc_dma_bufs' was not declared. Should it be static? drivers/char/synclinkmp.c:3494:5: warning: symbol 'alloc_buf_list' was not declared. Should it be static? drivers/char/synclinkmp.c:3553:5: warning: symbol 'alloc_frame_bufs' was not declared. Should it be static? drivers/char/synclinkmp.c:3570:6: warning: symbol 'free_dma_bufs' was not declared. Should it be static? drivers/char/synclinkmp.c:3580:5: warning: symbol 'alloc_tmp_rx_buf' was not declared. Should it be static? drivers/char/synclinkmp.c:3588:6: warning: symbol 'free_tmp_rx_buf' was not declared. Should it be static? drivers/char/synclinkmp.c:3594:5: warning: symbol 'claim_resources' was not declared. Should it be static? drivers/char/synclinkmp.c:3681:6: warning: symbol 'release_resources' was not declared. Should it be static? drivers/char/synclinkmp.c:3737:6: warning: symbol 'add_device' was not declared. Should it be static? drivers/char/synclinkmp.c:3860:6: warning: symbol 'device_init' was not declared. Should it be static? drivers/char/synclinkmp.c:4054:6: warning: symbol 'enable_loopback' was not declared. Should it be static? drivers/char/synclinkmp.c:4101:6: warning: symbol 'set_rate' was not declared. Should it be static? drivers/char/synclinkmp.c:4147:6: warning: symbol 'rx_stop' was not declared. Should it be static? drivers/char/synclinkmp.c:4168:6: warning: symbol 'rx_start' was not declared. Should it be static? drivers/char/synclinkmp.c:4225:6: warning: symbol 'tx_start' was not declared. Should it be static? drivers/char/synclinkmp.c:4295:6: warning: symbol 'tx_stop' was not declared. Should it be static? drivers/char/synclinkmp.c:4322:6: warning: symbol 'tx_load_fifo' was not declared. Should it be static? drivers/char/synclinkmp.c:4371:6: warning: symbol 'reset_port' was not declared. Should it be static? drivers/char/synclinkmp.c:4395:6: warning: symbol 'reset_adapter' was not declared. Should it be static? drivers/char/synclinkmp.c:4407:6: warning: symbol 'async_mode' was not declared. Should it be static? drivers/char/synclinkmp.c:4546:6: warning: symbol 'hdlc_mode' was not declared. Should it be static? drivers/char/synclinkmp.c:4748:6: warning: symbol 'tx_set_idle' was not declared. Should it be static? drivers/char/synclinkmp.c:4768:6: warning: symbol 'get_signals' was not declared. Should it be static? drivers/char/synclinkmp.c:4797:6: warning: symbol 'set_signals' was not declared. Should it be static? drivers/char/synclinkmp.c:4826:6: warning: symbol 'rx_reset_buffers' was not declared. Should it be static? drivers/char/synclinkmp.c:4837:6: warning: symbol 'rx_free_frame_buffers' was not declared. Should it be static? drivers/char/synclinkmp.c:4865:5: warning: symbol 'rx_get_frame' was not declared. Should it be static? drivers/char/synclinkmp.c:5040:6: warning: symbol 'tx_load_dma_buffer' was not declared. Should it be static? drivers/char/synclinkmp.c:5080:5: warning: symbol 'register_test' was not declared. Should it be static? drivers/char/synclinkmp.c:5119:5: warning: symbol 'irq_test' was not declared. Should it be static? drivers/char/synclinkmp.c:5211:5: warning: symbol 'init_adapter' was not declared. Should it be static? drivers/char/synclinkmp.c:5270:5: warning: symbol 'loopback_test' was not declared. Should it be static? drivers/char/synclinkmp.c:5335:5: warning: symbol 'adapter_test' was not declared. Should it be static? drivers/char/synclinkmp.c:5397:5: warning: symbol 'memory_test' was not declared. Should it be static? drivers/char/synclinkmp.c:5449:6: warning: symbol 'load_pci_memory' was not declared. Should it be static? drivers/char/synclinkmp.c:5468:6: warning: symbol 'trace_block' was not declared. Should it be static? drivers/char/synclinkmp.c:5503:6: warning: symbol 'tx_timeout' was not declared. Should it be static? drivers/char/synclinkmp.c:5530:6: warning: symbol 'status_timeout' was not declared. Should it be static? drivers/char/synclinkmp.c:5581:15: warning: symbol 'read_reg' was not declared. Should it be static? drivers/char/synclinkmp.c:5586:6: warning: symbol 'write_reg' was not declared. Should it be static? drivers/char/synclinkmp.c:5592:5: warning: symbol 'read_reg16' was not declared. Should it be static? drivers/char/synclinkmp.c:5598:6: warning: symbol 'write_reg16' was not declared. Should it be static? drivers/char/synclinkmp.c:5604:15: warning: symbol 'read_status_reg' was not declared. Should it be static? drivers/char/synclinkmp.c:5610:6: warning: symbol 'write_control_reg' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Paul Fulghum <paulkf@microgate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/synclinkmp.c')
-rw-r--r--drivers/char/synclinkmp.c120
1 files changed, 60 insertions, 60 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 66e8082aff7b..e98c3e6f8216 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -1473,7 +1473,7 @@ static inline int line_info(char *buf, SLMP_INFO *info)
1473 1473
1474/* Called to print information about devices 1474/* Called to print information about devices
1475 */ 1475 */
1476int read_proc(char *page, char **start, off_t off, int count, 1476static int read_proc(char *page, char **start, off_t off, int count,
1477 int *eof, void *data) 1477 int *eof, void *data)
1478{ 1478{
1479 int len = 0, l; 1479 int len = 0, l;
@@ -2024,7 +2024,7 @@ static void hdlcdev_exit(SLMP_INFO *info)
2024/* Return next bottom half action to perform. 2024/* Return next bottom half action to perform.
2025 * Return Value: BH action code or 0 if nothing to do. 2025 * Return Value: BH action code or 0 if nothing to do.
2026 */ 2026 */
2027int bh_action(SLMP_INFO *info) 2027static int bh_action(SLMP_INFO *info)
2028{ 2028{
2029 unsigned long flags; 2029 unsigned long flags;
2030 int rc = 0; 2030 int rc = 0;
@@ -2055,7 +2055,7 @@ int bh_action(SLMP_INFO *info)
2055 2055
2056/* Perform bottom half processing of work items queued by ISR. 2056/* Perform bottom half processing of work items queued by ISR.
2057 */ 2057 */
2058void bh_handler(struct work_struct *work) 2058static void bh_handler(struct work_struct *work)
2059{ 2059{
2060 SLMP_INFO *info = container_of(work, SLMP_INFO, task); 2060 SLMP_INFO *info = container_of(work, SLMP_INFO, task);
2061 int action; 2061 int action;
@@ -2100,7 +2100,7 @@ void bh_handler(struct work_struct *work)
2100 __FILE__,__LINE__,info->device_name); 2100 __FILE__,__LINE__,info->device_name);
2101} 2101}
2102 2102
2103void bh_receive(SLMP_INFO *info) 2103static void bh_receive(SLMP_INFO *info)
2104{ 2104{
2105 if ( debug_level >= DEBUG_LEVEL_BH ) 2105 if ( debug_level >= DEBUG_LEVEL_BH )
2106 printk( "%s(%d):%s bh_receive()\n", 2106 printk( "%s(%d):%s bh_receive()\n",
@@ -2109,7 +2109,7 @@ void bh_receive(SLMP_INFO *info)
2109 while( rx_get_frame(info) ); 2109 while( rx_get_frame(info) );
2110} 2110}
2111 2111
2112void bh_transmit(SLMP_INFO *info) 2112static void bh_transmit(SLMP_INFO *info)
2113{ 2113{
2114 struct tty_struct *tty = info->tty; 2114 struct tty_struct *tty = info->tty;
2115 2115
@@ -2121,7 +2121,7 @@ void bh_transmit(SLMP_INFO *info)
2121 tty_wakeup(tty); 2121 tty_wakeup(tty);
2122} 2122}
2123 2123
2124void bh_status(SLMP_INFO *info) 2124static void bh_status(SLMP_INFO *info)
2125{ 2125{
2126 if ( debug_level >= DEBUG_LEVEL_BH ) 2126 if ( debug_level >= DEBUG_LEVEL_BH )
2127 printk( "%s(%d):%s bh_status() entry\n", 2127 printk( "%s(%d):%s bh_status() entry\n",
@@ -2133,7 +2133,7 @@ void bh_status(SLMP_INFO *info)
2133 info->cts_chkcount = 0; 2133 info->cts_chkcount = 0;
2134} 2134}
2135 2135
2136void isr_timer(SLMP_INFO * info) 2136static void isr_timer(SLMP_INFO * info)
2137{ 2137{
2138 unsigned char timer = (info->port_num & 1) ? TIMER2 : TIMER0; 2138 unsigned char timer = (info->port_num & 1) ? TIMER2 : TIMER0;
2139 2139
@@ -2159,7 +2159,7 @@ void isr_timer(SLMP_INFO * info)
2159 __FILE__,__LINE__,info->device_name); 2159 __FILE__,__LINE__,info->device_name);
2160} 2160}
2161 2161
2162void isr_rxint(SLMP_INFO * info) 2162static void isr_rxint(SLMP_INFO * info)
2163{ 2163{
2164 struct tty_struct *tty = info->tty; 2164 struct tty_struct *tty = info->tty;
2165 struct mgsl_icount *icount = &info->icount; 2165 struct mgsl_icount *icount = &info->icount;
@@ -2218,7 +2218,7 @@ void isr_rxint(SLMP_INFO * info)
2218/* 2218/*
2219 * handle async rx data interrupts 2219 * handle async rx data interrupts
2220 */ 2220 */
2221void isr_rxrdy(SLMP_INFO * info) 2221static void isr_rxrdy(SLMP_INFO * info)
2222{ 2222{
2223 u16 status; 2223 u16 status;
2224 unsigned char DataByte; 2224 unsigned char DataByte;
@@ -2348,7 +2348,7 @@ static void isr_txeom(SLMP_INFO * info, unsigned char status)
2348/* 2348/*
2349 * handle tx status interrupts 2349 * handle tx status interrupts
2350 */ 2350 */
2351void isr_txint(SLMP_INFO * info) 2351static void isr_txint(SLMP_INFO * info)
2352{ 2352{
2353 unsigned char status = read_reg(info, SR1) & info->ie1_value & (UDRN + IDLE + CCTS); 2353 unsigned char status = read_reg(info, SR1) & info->ie1_value & (UDRN + IDLE + CCTS);
2354 2354
@@ -2376,7 +2376,7 @@ void isr_txint(SLMP_INFO * info)
2376/* 2376/*
2377 * handle async tx data interrupts 2377 * handle async tx data interrupts
2378 */ 2378 */
2379void isr_txrdy(SLMP_INFO * info) 2379static void isr_txrdy(SLMP_INFO * info)
2380{ 2380{
2381 if ( debug_level >= DEBUG_LEVEL_ISR ) 2381 if ( debug_level >= DEBUG_LEVEL_ISR )
2382 printk("%s(%d):%s isr_txrdy() tx_count=%d\n", 2382 printk("%s(%d):%s isr_txrdy() tx_count=%d\n",
@@ -2407,7 +2407,7 @@ void isr_txrdy(SLMP_INFO * info)
2407 info->pending_bh |= BH_TRANSMIT; 2407 info->pending_bh |= BH_TRANSMIT;
2408} 2408}
2409 2409
2410void isr_rxdmaok(SLMP_INFO * info) 2410static void isr_rxdmaok(SLMP_INFO * info)
2411{ 2411{
2412 /* BIT7 = EOT (end of transfer) 2412 /* BIT7 = EOT (end of transfer)
2413 * BIT6 = EOM (end of message/frame) 2413 * BIT6 = EOM (end of message/frame)
@@ -2424,7 +2424,7 @@ void isr_rxdmaok(SLMP_INFO * info)
2424 info->pending_bh |= BH_RECEIVE; 2424 info->pending_bh |= BH_RECEIVE;
2425} 2425}
2426 2426
2427void isr_rxdmaerror(SLMP_INFO * info) 2427static void isr_rxdmaerror(SLMP_INFO * info)
2428{ 2428{
2429 /* BIT5 = BOF (buffer overflow) 2429 /* BIT5 = BOF (buffer overflow)
2430 * BIT4 = COF (counter overflow) 2430 * BIT4 = COF (counter overflow)
@@ -2442,7 +2442,7 @@ void isr_rxdmaerror(SLMP_INFO * info)
2442 info->pending_bh |= BH_RECEIVE; 2442 info->pending_bh |= BH_RECEIVE;
2443} 2443}
2444 2444
2445void isr_txdmaok(SLMP_INFO * info) 2445static void isr_txdmaok(SLMP_INFO * info)
2446{ 2446{
2447 unsigned char status_reg1 = read_reg(info, SR1); 2447 unsigned char status_reg1 = read_reg(info, SR1);
2448 2448
@@ -2460,7 +2460,7 @@ void isr_txdmaok(SLMP_INFO * info)
2460 write_reg(info, IE0, info->ie0_value); 2460 write_reg(info, IE0, info->ie0_value);
2461} 2461}
2462 2462
2463void isr_txdmaerror(SLMP_INFO * info) 2463static void isr_txdmaerror(SLMP_INFO * info)
2464{ 2464{
2465 /* BIT5 = BOF (buffer overflow) 2465 /* BIT5 = BOF (buffer overflow)
2466 * BIT4 = COF (counter overflow) 2466 * BIT4 = COF (counter overflow)
@@ -2477,7 +2477,7 @@ void isr_txdmaerror(SLMP_INFO * info)
2477 2477
2478/* handle input serial signal changes 2478/* handle input serial signal changes
2479 */ 2479 */
2480void isr_io_pin( SLMP_INFO *info, u16 status ) 2480static void isr_io_pin( SLMP_INFO *info, u16 status )
2481{ 2481{
2482 struct mgsl_icount *icount; 2482 struct mgsl_icount *icount;
2483 2483
@@ -3414,7 +3414,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
3414 return retval; 3414 return retval;
3415} 3415}
3416 3416
3417int alloc_dma_bufs(SLMP_INFO *info) 3417static int alloc_dma_bufs(SLMP_INFO *info)
3418{ 3418{
3419 unsigned short BuffersPerFrame; 3419 unsigned short BuffersPerFrame;
3420 unsigned short BufferCount; 3420 unsigned short BufferCount;
@@ -3488,7 +3488,7 @@ int alloc_dma_bufs(SLMP_INFO *info)
3488 3488
3489/* Allocate DMA buffers for the transmit and receive descriptor lists. 3489/* Allocate DMA buffers for the transmit and receive descriptor lists.
3490 */ 3490 */
3491int alloc_buf_list(SLMP_INFO *info) 3491static int alloc_buf_list(SLMP_INFO *info)
3492{ 3492{
3493 unsigned int i; 3493 unsigned int i;
3494 3494
@@ -3547,7 +3547,7 @@ int alloc_buf_list(SLMP_INFO *info)
3547 3547
3548/* Allocate the frame DMA buffers used by the specified buffer list. 3548/* Allocate the frame DMA buffers used by the specified buffer list.
3549 */ 3549 */
3550int alloc_frame_bufs(SLMP_INFO *info, SCADESC *buf_list,SCADESC_EX *buf_list_ex,int count) 3550static int alloc_frame_bufs(SLMP_INFO *info, SCADESC *buf_list,SCADESC_EX *buf_list_ex,int count)
3551{ 3551{
3552 int i; 3552 int i;
3553 unsigned long phys_addr; 3553 unsigned long phys_addr;
@@ -3564,7 +3564,7 @@ int alloc_frame_bufs(SLMP_INFO *info, SCADESC *buf_list,SCADESC_EX *buf_list_ex,
3564 return 0; 3564 return 0;
3565} 3565}
3566 3566
3567void free_dma_bufs(SLMP_INFO *info) 3567static void free_dma_bufs(SLMP_INFO *info)
3568{ 3568{
3569 info->buffer_list = NULL; 3569 info->buffer_list = NULL;
3570 info->rx_buf_list = NULL; 3570 info->rx_buf_list = NULL;
@@ -3574,7 +3574,7 @@ void free_dma_bufs(SLMP_INFO *info)
3574/* allocate buffer large enough to hold max_frame_size. 3574/* allocate buffer large enough to hold max_frame_size.
3575 * This buffer is used to pass an assembled frame to the line discipline. 3575 * This buffer is used to pass an assembled frame to the line discipline.
3576 */ 3576 */
3577int alloc_tmp_rx_buf(SLMP_INFO *info) 3577static int alloc_tmp_rx_buf(SLMP_INFO *info)
3578{ 3578{
3579 info->tmp_rx_buf = kmalloc(info->max_frame_size, GFP_KERNEL); 3579 info->tmp_rx_buf = kmalloc(info->max_frame_size, GFP_KERNEL);
3580 if (info->tmp_rx_buf == NULL) 3580 if (info->tmp_rx_buf == NULL)
@@ -3582,13 +3582,13 @@ int alloc_tmp_rx_buf(SLMP_INFO *info)
3582 return 0; 3582 return 0;
3583} 3583}
3584 3584
3585void free_tmp_rx_buf(SLMP_INFO *info) 3585static void free_tmp_rx_buf(SLMP_INFO *info)
3586{ 3586{
3587 kfree(info->tmp_rx_buf); 3587 kfree(info->tmp_rx_buf);
3588 info->tmp_rx_buf = NULL; 3588 info->tmp_rx_buf = NULL;
3589} 3589}
3590 3590
3591int claim_resources(SLMP_INFO *info) 3591static int claim_resources(SLMP_INFO *info)
3592{ 3592{
3593 if (request_mem_region(info->phys_memory_base,SCA_MEM_SIZE,"synclinkmp") == NULL) { 3593 if (request_mem_region(info->phys_memory_base,SCA_MEM_SIZE,"synclinkmp") == NULL) {
3594 printk( "%s(%d):%s mem addr conflict, Addr=%08X\n", 3594 printk( "%s(%d):%s mem addr conflict, Addr=%08X\n",
@@ -3675,7 +3675,7 @@ errout:
3675 return -ENODEV; 3675 return -ENODEV;
3676} 3676}
3677 3677
3678void release_resources(SLMP_INFO *info) 3678static void release_resources(SLMP_INFO *info)
3679{ 3679{
3680 if ( debug_level >= DEBUG_LEVEL_INFO ) 3680 if ( debug_level >= DEBUG_LEVEL_INFO )
3681 printk( "%s(%d):%s release_resources() entry\n", 3681 printk( "%s(%d):%s release_resources() entry\n",
@@ -3731,7 +3731,7 @@ void release_resources(SLMP_INFO *info)
3731/* Add the specified device instance data structure to the 3731/* Add the specified device instance data structure to the
3732 * global linked list of devices and increment the device count. 3732 * global linked list of devices and increment the device count.
3733 */ 3733 */
3734void add_device(SLMP_INFO *info) 3734static void add_device(SLMP_INFO *info)
3735{ 3735{
3736 info->next_device = NULL; 3736 info->next_device = NULL;
3737 info->line = synclinkmp_device_count; 3737 info->line = synclinkmp_device_count;
@@ -3854,7 +3854,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev)
3854 return info; 3854 return info;
3855} 3855}
3856 3856
3857void device_init(int adapter_num, struct pci_dev *pdev) 3857static void device_init(int adapter_num, struct pci_dev *pdev)
3858{ 3858{
3859 SLMP_INFO *port_array[SCA_MAX_PORTS]; 3859 SLMP_INFO *port_array[SCA_MAX_PORTS];
3860 int port; 3860 int port;
@@ -4048,7 +4048,7 @@ module_exit(synclinkmp_exit);
4048 * The TxCLK and RxCLK signals are generated from the BRG and 4048 * The TxCLK and RxCLK signals are generated from the BRG and
4049 * the TxD is looped back to the RxD internally. 4049 * the TxD is looped back to the RxD internally.
4050 */ 4050 */
4051void enable_loopback(SLMP_INFO *info, int enable) 4051static void enable_loopback(SLMP_INFO *info, int enable)
4052{ 4052{
4053 if (enable) { 4053 if (enable) {
4054 /* MD2 (Mode Register 2) 4054 /* MD2 (Mode Register 2)
@@ -4095,7 +4095,7 @@ void enable_loopback(SLMP_INFO *info, int enable)
4095 * data_rate data rate of clock in bits per second 4095 * data_rate data rate of clock in bits per second
4096 * A data rate of 0 disables the AUX clock. 4096 * A data rate of 0 disables the AUX clock.
4097 */ 4097 */
4098void set_rate( SLMP_INFO *info, u32 data_rate ) 4098static void set_rate( SLMP_INFO *info, u32 data_rate )
4099{ 4099{
4100 u32 TMCValue; 4100 u32 TMCValue;
4101 unsigned char BRValue; 4101 unsigned char BRValue;
@@ -4141,7 +4141,7 @@ void set_rate( SLMP_INFO *info, u32 data_rate )
4141 4141
4142/* Disable receiver 4142/* Disable receiver
4143 */ 4143 */
4144void rx_stop(SLMP_INFO *info) 4144static void rx_stop(SLMP_INFO *info)
4145{ 4145{
4146 if (debug_level >= DEBUG_LEVEL_ISR) 4146 if (debug_level >= DEBUG_LEVEL_ISR)
4147 printk("%s(%d):%s rx_stop()\n", 4147 printk("%s(%d):%s rx_stop()\n",
@@ -4162,7 +4162,7 @@ void rx_stop(SLMP_INFO *info)
4162 4162
4163/* enable the receiver 4163/* enable the receiver
4164 */ 4164 */
4165void rx_start(SLMP_INFO *info) 4165static void rx_start(SLMP_INFO *info)
4166{ 4166{
4167 int i; 4167 int i;
4168 4168
@@ -4219,7 +4219,7 @@ void rx_start(SLMP_INFO *info)
4219/* Enable the transmitter and send a transmit frame if 4219/* Enable the transmitter and send a transmit frame if
4220 * one is loaded in the DMA buffers. 4220 * one is loaded in the DMA buffers.
4221 */ 4221 */
4222void tx_start(SLMP_INFO *info) 4222static void tx_start(SLMP_INFO *info)
4223{ 4223{
4224 if (debug_level >= DEBUG_LEVEL_ISR) 4224 if (debug_level >= DEBUG_LEVEL_ISR)
4225 printk("%s(%d):%s tx_start() tx_count=%d\n", 4225 printk("%s(%d):%s tx_start() tx_count=%d\n",
@@ -4289,7 +4289,7 @@ void tx_start(SLMP_INFO *info)
4289 4289
4290/* stop the transmitter and DMA 4290/* stop the transmitter and DMA
4291 */ 4291 */
4292void tx_stop( SLMP_INFO *info ) 4292static void tx_stop( SLMP_INFO *info )
4293{ 4293{
4294 if (debug_level >= DEBUG_LEVEL_ISR) 4294 if (debug_level >= DEBUG_LEVEL_ISR)
4295 printk("%s(%d):%s tx_stop()\n", 4295 printk("%s(%d):%s tx_stop()\n",
@@ -4316,7 +4316,7 @@ void tx_stop( SLMP_INFO *info )
4316/* Fill the transmit FIFO until the FIFO is full or 4316/* Fill the transmit FIFO until the FIFO is full or
4317 * there is no more data to load. 4317 * there is no more data to load.
4318 */ 4318 */
4319void tx_load_fifo(SLMP_INFO *info) 4319static void tx_load_fifo(SLMP_INFO *info)
4320{ 4320{
4321 u8 TwoBytes[2]; 4321 u8 TwoBytes[2];
4322 4322
@@ -4365,7 +4365,7 @@ void tx_load_fifo(SLMP_INFO *info)
4365 4365
4366/* Reset a port to a known state 4366/* Reset a port to a known state
4367 */ 4367 */
4368void reset_port(SLMP_INFO *info) 4368static void reset_port(SLMP_INFO *info)
4369{ 4369{
4370 if (info->sca_base) { 4370 if (info->sca_base) {
4371 4371
@@ -4389,7 +4389,7 @@ void reset_port(SLMP_INFO *info)
4389 4389
4390/* Reset all the ports to a known state. 4390/* Reset all the ports to a known state.
4391 */ 4391 */
4392void reset_adapter(SLMP_INFO *info) 4392static void reset_adapter(SLMP_INFO *info)
4393{ 4393{
4394 int i; 4394 int i;
4395 4395
@@ -4401,7 +4401,7 @@ void reset_adapter(SLMP_INFO *info)
4401 4401
4402/* Program port for asynchronous communications. 4402/* Program port for asynchronous communications.
4403 */ 4403 */
4404void async_mode(SLMP_INFO *info) 4404static void async_mode(SLMP_INFO *info)
4405{ 4405{
4406 4406
4407 unsigned char RegValue; 4407 unsigned char RegValue;
@@ -4540,7 +4540,7 @@ void async_mode(SLMP_INFO *info)
4540 4540
4541/* Program the SCA for HDLC communications. 4541/* Program the SCA for HDLC communications.
4542 */ 4542 */
4543void hdlc_mode(SLMP_INFO *info) 4543static void hdlc_mode(SLMP_INFO *info)
4544{ 4544{
4545 unsigned char RegValue; 4545 unsigned char RegValue;
4546 u32 DpllDivisor; 4546 u32 DpllDivisor;
@@ -4742,7 +4742,7 @@ void hdlc_mode(SLMP_INFO *info)
4742 4742
4743/* Set the transmit HDLC idle mode 4743/* Set the transmit HDLC idle mode
4744 */ 4744 */
4745void tx_set_idle(SLMP_INFO *info) 4745static void tx_set_idle(SLMP_INFO *info)
4746{ 4746{
4747 unsigned char RegValue = 0xff; 4747 unsigned char RegValue = 0xff;
4748 4748
@@ -4762,7 +4762,7 @@ void tx_set_idle(SLMP_INFO *info)
4762 4762
4763/* Query the adapter for the state of the V24 status (input) signals. 4763/* Query the adapter for the state of the V24 status (input) signals.
4764 */ 4764 */
4765void get_signals(SLMP_INFO *info) 4765static void get_signals(SLMP_INFO *info)
4766{ 4766{
4767 u16 status = read_reg(info, SR3); 4767 u16 status = read_reg(info, SR3);
4768 u16 gpstatus = read_status_reg(info); 4768 u16 gpstatus = read_status_reg(info);
@@ -4791,7 +4791,7 @@ void get_signals(SLMP_INFO *info)
4791/* Set the state of DTR and RTS based on contents of 4791/* Set the state of DTR and RTS based on contents of
4792 * serial_signals member of device context. 4792 * serial_signals member of device context.
4793 */ 4793 */
4794void set_signals(SLMP_INFO *info) 4794static void set_signals(SLMP_INFO *info)
4795{ 4795{
4796 unsigned char RegValue; 4796 unsigned char RegValue;
4797 u16 EnableBit; 4797 u16 EnableBit;
@@ -4820,7 +4820,7 @@ void set_signals(SLMP_INFO *info)
4820 * and set the current buffer to the first buffer. This effectively 4820 * and set the current buffer to the first buffer. This effectively
4821 * makes all buffers free and discards any data in buffers. 4821 * makes all buffers free and discards any data in buffers.
4822 */ 4822 */
4823void rx_reset_buffers(SLMP_INFO *info) 4823static void rx_reset_buffers(SLMP_INFO *info)
4824{ 4824{
4825 rx_free_frame_buffers(info, 0, info->rx_buf_count - 1); 4825 rx_free_frame_buffers(info, 0, info->rx_buf_count - 1);
4826} 4826}
@@ -4831,7 +4831,7 @@ void rx_reset_buffers(SLMP_INFO *info)
4831 * first index of 1st receive buffer of frame 4831 * first index of 1st receive buffer of frame
4832 * last index of last receive buffer of frame 4832 * last index of last receive buffer of frame
4833 */ 4833 */
4834void rx_free_frame_buffers(SLMP_INFO *info, unsigned int first, unsigned int last) 4834static void rx_free_frame_buffers(SLMP_INFO *info, unsigned int first, unsigned int last)
4835{ 4835{
4836 bool done = false; 4836 bool done = false;
4837 4837
@@ -4859,7 +4859,7 @@ void rx_free_frame_buffers(SLMP_INFO *info, unsigned int first, unsigned int las
4859 * 4859 *
4860 * Return Value: true if frame returned, otherwise false 4860 * Return Value: true if frame returned, otherwise false
4861 */ 4861 */
4862bool rx_get_frame(SLMP_INFO *info) 4862static bool rx_get_frame(SLMP_INFO *info)
4863{ 4863{
4864 unsigned int StartIndex, EndIndex; /* index of 1st and last buffers of Rx frame */ 4864 unsigned int StartIndex, EndIndex; /* index of 1st and last buffers of Rx frame */
4865 unsigned short status; 4865 unsigned short status;
@@ -5034,7 +5034,7 @@ Cleanup:
5034 5034
5035/* load the transmit DMA buffer with data 5035/* load the transmit DMA buffer with data
5036 */ 5036 */
5037void tx_load_dma_buffer(SLMP_INFO *info, const char *buf, unsigned int count) 5037static void tx_load_dma_buffer(SLMP_INFO *info, const char *buf, unsigned int count)
5038{ 5038{
5039 unsigned short copy_count; 5039 unsigned short copy_count;
5040 unsigned int i = 0; 5040 unsigned int i = 0;
@@ -5074,7 +5074,7 @@ void tx_load_dma_buffer(SLMP_INFO *info, const char *buf, unsigned int count)
5074 info->last_tx_buf = ++i; 5074 info->last_tx_buf = ++i;
5075} 5075}
5076 5076
5077bool register_test(SLMP_INFO *info) 5077static bool register_test(SLMP_INFO *info)
5078{ 5078{
5079 static unsigned char testval[] = {0x00, 0xff, 0xaa, 0x55, 0x69, 0x96}; 5079 static unsigned char testval[] = {0x00, 0xff, 0xaa, 0x55, 0x69, 0x96};
5080 static unsigned int count = ARRAY_SIZE(testval); 5080 static unsigned int count = ARRAY_SIZE(testval);
@@ -5113,7 +5113,7 @@ bool register_test(SLMP_INFO *info)
5113 return rc; 5113 return rc;
5114} 5114}
5115 5115
5116bool irq_test(SLMP_INFO *info) 5116static bool irq_test(SLMP_INFO *info)
5117{ 5117{
5118 unsigned long timeout; 5118 unsigned long timeout;
5119 unsigned long flags; 5119 unsigned long flags;
@@ -5205,7 +5205,7 @@ static bool sca_init(SLMP_INFO *info)
5205 5205
5206/* initialize adapter hardware 5206/* initialize adapter hardware
5207 */ 5207 */
5208bool init_adapter(SLMP_INFO *info) 5208static bool init_adapter(SLMP_INFO *info)
5209{ 5209{
5210 int i; 5210 int i;
5211 5211
@@ -5264,7 +5264,7 @@ bool init_adapter(SLMP_INFO *info)
5264/* Loopback an HDLC frame to test the hardware 5264/* Loopback an HDLC frame to test the hardware
5265 * interrupt and DMA functions. 5265 * interrupt and DMA functions.
5266 */ 5266 */
5267bool loopback_test(SLMP_INFO *info) 5267static bool loopback_test(SLMP_INFO *info)
5268{ 5268{
5269#define TESTFRAMESIZE 20 5269#define TESTFRAMESIZE 20
5270 5270
@@ -5329,7 +5329,7 @@ bool loopback_test(SLMP_INFO *info)
5329 5329
5330/* Perform diagnostics on hardware 5330/* Perform diagnostics on hardware
5331 */ 5331 */
5332int adapter_test( SLMP_INFO *info ) 5332static int adapter_test( SLMP_INFO *info )
5333{ 5333{
5334 unsigned long flags; 5334 unsigned long flags;
5335 if ( debug_level >= DEBUG_LEVEL_INFO ) 5335 if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -5391,7 +5391,7 @@ int adapter_test( SLMP_INFO *info )
5391 5391
5392/* Test the shared memory on a PCI adapter. 5392/* Test the shared memory on a PCI adapter.
5393 */ 5393 */
5394bool memory_test(SLMP_INFO *info) 5394static bool memory_test(SLMP_INFO *info)
5395{ 5395{
5396 static unsigned long testval[] = { 0x0, 0x55555555, 0xaaaaaaaa, 5396 static unsigned long testval[] = { 0x0, 0x55555555, 0xaaaaaaaa,
5397 0x66666666, 0x99999999, 0xffffffff, 0x12345678 }; 5397 0x66666666, 0x99999999, 0xffffffff, 0x12345678 };
@@ -5443,7 +5443,7 @@ bool memory_test(SLMP_INFO *info)
5443 * the write transation. This allows any pending DMA request to gain control 5443 * the write transation. This allows any pending DMA request to gain control
5444 * of the local bus in a timely fasion. 5444 * of the local bus in a timely fasion.
5445 */ 5445 */
5446void load_pci_memory(SLMP_INFO *info, char* dest, const char* src, unsigned short count) 5446static void load_pci_memory(SLMP_INFO *info, char* dest, const char* src, unsigned short count)
5447{ 5447{
5448 /* A load interval of 16 allows for 4 32-bit writes at */ 5448 /* A load interval of 16 allows for 4 32-bit writes at */
5449 /* 136ns each for a maximum latency of 542ns on the local bus.*/ 5449 /* 136ns each for a maximum latency of 542ns on the local bus.*/
@@ -5462,7 +5462,7 @@ void load_pci_memory(SLMP_INFO *info, char* dest, const char* src, unsigned shor
5462 memcpy(dest, src, count % sca_pci_load_interval); 5462 memcpy(dest, src, count % sca_pci_load_interval);
5463} 5463}
5464 5464
5465void trace_block(SLMP_INFO *info,const char* data, int count, int xmit) 5465static void trace_block(SLMP_INFO *info,const char* data, int count, int xmit)
5466{ 5466{
5467 int i; 5467 int i;
5468 int linecount; 5468 int linecount;
@@ -5497,7 +5497,7 @@ void trace_block(SLMP_INFO *info,const char* data, int count, int xmit)
5497/* called when HDLC frame times out 5497/* called when HDLC frame times out
5498 * update stats and do tx completion processing 5498 * update stats and do tx completion processing
5499 */ 5499 */
5500void tx_timeout(unsigned long context) 5500static void tx_timeout(unsigned long context)
5501{ 5501{
5502 SLMP_INFO *info = (SLMP_INFO*)context; 5502 SLMP_INFO *info = (SLMP_INFO*)context;
5503 unsigned long flags; 5503 unsigned long flags;
@@ -5524,7 +5524,7 @@ void tx_timeout(unsigned long context)
5524 5524
5525/* called to periodically check the DSR/RI modem signal input status 5525/* called to periodically check the DSR/RI modem signal input status
5526 */ 5526 */
5527void status_timeout(unsigned long context) 5527static void status_timeout(unsigned long context)
5528{ 5528{
5529 u16 status = 0; 5529 u16 status = 0;
5530 SLMP_INFO *info = (SLMP_INFO*)context; 5530 SLMP_INFO *info = (SLMP_INFO*)context;
@@ -5575,36 +5575,36 @@ void status_timeout(unsigned long context)
5575 } 5575 }
5576 5576
5577 5577
5578unsigned char read_reg(SLMP_INFO * info, unsigned char Addr) 5578static unsigned char read_reg(SLMP_INFO * info, unsigned char Addr)
5579{ 5579{
5580 CALC_REGADDR(); 5580 CALC_REGADDR();
5581 return *RegAddr; 5581 return *RegAddr;
5582} 5582}
5583void write_reg(SLMP_INFO * info, unsigned char Addr, unsigned char Value) 5583static void write_reg(SLMP_INFO * info, unsigned char Addr, unsigned char Value)
5584{ 5584{
5585 CALC_REGADDR(); 5585 CALC_REGADDR();
5586 *RegAddr = Value; 5586 *RegAddr = Value;
5587} 5587}
5588 5588
5589u16 read_reg16(SLMP_INFO * info, unsigned char Addr) 5589static u16 read_reg16(SLMP_INFO * info, unsigned char Addr)
5590{ 5590{
5591 CALC_REGADDR(); 5591 CALC_REGADDR();
5592 return *((u16 *)RegAddr); 5592 return *((u16 *)RegAddr);
5593} 5593}
5594 5594
5595void write_reg16(SLMP_INFO * info, unsigned char Addr, u16 Value) 5595static void write_reg16(SLMP_INFO * info, unsigned char Addr, u16 Value)
5596{ 5596{
5597 CALC_REGADDR(); 5597 CALC_REGADDR();
5598 *((u16 *)RegAddr) = Value; 5598 *((u16 *)RegAddr) = Value;
5599} 5599}
5600 5600
5601unsigned char read_status_reg(SLMP_INFO * info) 5601static unsigned char read_status_reg(SLMP_INFO * info)
5602{ 5602{
5603 unsigned char *RegAddr = (unsigned char *)info->statctrl_base; 5603 unsigned char *RegAddr = (unsigned char *)info->statctrl_base;
5604 return *RegAddr; 5604 return *RegAddr;
5605} 5605}
5606 5606
5607void write_control_reg(SLMP_INFO * info) 5607static void write_control_reg(SLMP_INFO * info)
5608{ 5608{
5609 unsigned char *RegAddr = (unsigned char *)info->statctrl_base; 5609 unsigned char *RegAddr = (unsigned char *)info->statctrl_base;
5610 *RegAddr = info->port_array[0]->ctrlreg_value; 5610 *RegAddr = info->port_array[0]->ctrlreg_value;