Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] drivers/net/wan/: possible cleanups

This patch contains possible cleanups including the following:
- make needlessly global code static
- #if 0 the following unused global function:
- sdladrv.c: sdla_intde
- remove the following unused global variable:
- lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
- cycx_drv.c: cycx_inten
- sdladrv.c: sdla_inten
- sdladrv.c: sdla_intde
- sdladrv.c: sdla_intack
- sdladrv.c: sdla_intr
- syncppp.c: sppp_input
- syncppp.c: sppp_change_mtu

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

authored by

Adrian Bunk and committed by
Jeff Garzik
7665a089 8e18d1f9

+102 -140
+3 -4
drivers/net/wan/cycx_drv.c
··· 109 109 * < 0 error. 110 110 * Context: process */ 111 111 112 - int __init cycx_drv_init(void) 112 + static int __init cycx_drv_init(void) 113 113 { 114 114 printk(KERN_INFO "%s v%u.%u %s\n", fullname, MOD_VERSION, MOD_RELEASE, 115 115 copyright); ··· 119 119 120 120 /* Module 'remove' entry point. 121 121 * o release all remaining system resources */ 122 - void cycx_drv_cleanup(void) 122 + static void cycx_drv_cleanup(void) 123 123 { 124 124 } 125 125 ··· 184 184 } 185 185 186 186 /* Enable interrupt generation. */ 187 - EXPORT_SYMBOL(cycx_inten); 188 - void cycx_inten(struct cycx_hw *hw) 187 + static void cycx_inten(struct cycx_hw *hw) 189 188 { 190 189 writeb(0, hw->dpmbase); 191 190 }
+1 -1
drivers/net/wan/cycx_main.c
··· 103 103 * < 0 error. 104 104 * Context: process 105 105 */ 106 - int __init cycx_init(void) 106 + static int __init cycx_init(void) 107 107 { 108 108 int cnt, err = -ENOMEM; 109 109
+8 -6
drivers/net/wan/dscc4.c
··· 446 446 return readl(dpriv->base_addr + CH0FTDA + dpriv->dev_id*4) == dpriv->ltda; 447 447 } 448 448 449 - int state_check(u32 state, struct dscc4_dev_priv *dpriv, struct net_device *dev, 450 - const char *msg) 449 + static int state_check(u32 state, struct dscc4_dev_priv *dpriv, 450 + struct net_device *dev, const char *msg) 451 451 { 452 452 int ret = 0; 453 453 ··· 466 466 return ret; 467 467 } 468 468 469 - void dscc4_tx_print(struct net_device *dev, struct dscc4_dev_priv *dpriv, 470 - char *msg) 469 + static void dscc4_tx_print(struct net_device *dev, 470 + struct dscc4_dev_priv *dpriv, 471 + char *msg) 471 472 { 472 473 printk(KERN_DEBUG "%s: tx_current=%02d tx_dirty=%02d (%s)\n", 473 474 dev->name, dpriv->tx_current, dpriv->tx_dirty, msg); ··· 508 507 } 509 508 } 510 509 511 - inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, struct net_device *dev) 510 + static inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, 511 + struct net_device *dev) 512 512 { 513 513 unsigned int dirty = dpriv->rx_dirty%RX_RING_SIZE; 514 514 struct RxFD *rx_fd = dpriv->rx_fd + dirty; ··· 1893 1891 * It failed and locked solid. Thus the introduction of a dummy skb. 1894 1892 * Problem is acknowledged in errata sheet DS5. Joy :o/ 1895 1893 */ 1896 - struct sk_buff *dscc4_init_dummy_skb(struct dscc4_dev_priv *dpriv) 1894 + static struct sk_buff *dscc4_init_dummy_skb(struct dscc4_dev_priv *dpriv) 1897 1895 { 1898 1896 struct sk_buff *skb; 1899 1897
+12 -12
drivers/net/wan/farsync.c
··· 74 74 /* 75 75 * Modules parameters and associated varaibles 76 76 */ 77 - int fst_txq_low = FST_LOW_WATER_MARK; 78 - int fst_txq_high = FST_HIGH_WATER_MARK; 79 - int fst_max_reads = 7; 80 - int fst_excluded_cards = 0; 81 - int fst_excluded_list[FST_MAX_CARDS]; 77 + static int fst_txq_low = FST_LOW_WATER_MARK; 78 + static int fst_txq_high = FST_HIGH_WATER_MARK; 79 + static int fst_max_reads = 7; 80 + static int fst_excluded_cards = 0; 81 + static int fst_excluded_list[FST_MAX_CARDS]; 82 82 83 83 module_param(fst_txq_low, int, 0); 84 84 module_param(fst_txq_high, int, 0); ··· 572 572 static void fst_process_tx_work_q(unsigned long work_q); 573 573 static void fst_process_int_work_q(unsigned long work_q); 574 574 575 - DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0); 576 - DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0); 575 + static DECLARE_TASKLET(fst_tx_task, fst_process_tx_work_q, 0); 576 + static DECLARE_TASKLET(fst_int_task, fst_process_int_work_q, 0); 577 577 578 - struct fst_card_info *fst_card_array[FST_MAX_CARDS]; 579 - spinlock_t fst_work_q_lock; 580 - u64 fst_work_txq; 581 - u64 fst_work_intq; 578 + static struct fst_card_info *fst_card_array[FST_MAX_CARDS]; 579 + static spinlock_t fst_work_q_lock; 580 + static u64 fst_work_txq; 581 + static u64 fst_work_intq; 582 582 583 583 static void 584 584 fst_q_work_item(u64 * queue, int card_index) ··· 1497 1497 * The interrupt service routine 1498 1498 * Dev_id is our fst_card_info pointer 1499 1499 */ 1500 - irqreturn_t 1500 + static irqreturn_t 1501 1501 fst_intr(int irq, void *dev_id, struct pt_regs *regs) 1502 1502 { 1503 1503 struct fst_card_info *card;
+1 -1
drivers/net/wan/hdlc_fr.c
··· 330 330 331 331 332 332 333 - int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 333 + static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 334 334 { 335 335 pvc_device *pvc = dev_to_pvc(dev); 336 336 fr_proto_pvc_info info;
+5 -7
drivers/net/wan/lmc/lmc_debug.c
··· 8 8 /* 9 9 * Prints out len, max to 80 octets using printk, 20 per line 10 10 */ 11 - void lmcConsoleLog(char *type, unsigned char *ucData, int iLen) 12 - { 13 11 #ifdef DEBUG 14 12 #ifdef LMC_PACKET_LOG 13 + void lmcConsoleLog(char *type, unsigned char *ucData, int iLen) 14 + { 15 15 int iNewLine = 1; 16 16 char str[80], *pstr; 17 17 ··· 43 43 } 44 44 sprintf(pstr, "\n"); 45 45 printk(str); 46 - #endif 47 - #endif 48 46 } 47 + #endif 48 + #endif 49 49 50 50 #ifdef DEBUG 51 51 u_int32_t lmcEventLogIndex = 0; 52 52 u_int32_t lmcEventLogBuf[LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS]; 53 - #endif 54 53 55 54 void lmcEventLog (u_int32_t EventNum, u_int32_t arg2, u_int32_t arg3) 56 55 { 57 - #ifdef DEBUG 58 56 lmcEventLogBuf[lmcEventLogIndex++] = EventNum; 59 57 lmcEventLogBuf[lmcEventLogIndex++] = arg2; 60 58 lmcEventLogBuf[lmcEventLogIndex++] = arg3; 61 59 lmcEventLogBuf[lmcEventLogIndex++] = jiffies; 62 60 63 61 lmcEventLogIndex &= (LMC_EVENTLOGSIZE * LMC_EVENTLOGARGS) - 1; 64 - #endif 65 62 } 63 + #endif /* DEBUG */ 66 64 67 65 void lmc_trace(struct net_device *dev, char *msg){ 68 66 #ifdef LMC_TRACE
-8
drivers/net/wan/lmc/lmc_media.c
··· 48 48 */ 49 49 50 50 /* 51 - * For lack of a better place, put the SSI cable stuff here. 52 - */ 53 - char *lmc_t1_cables[] = { 54 - "V.10/RS423", "EIA530A", "reserved", "X.21", "V.35", 55 - "EIA449/EIA530/V.36", "V.28/EIA232", "none", NULL 56 - }; 57 - 58 - /* 59 51 * protocol independent method. 60 52 */ 61 53 static void lmc_set_protocol (lmc_softc_t * const, lmc_ctl_t *);
-16
drivers/net/wan/pc300.h
··· 472 472 473 473 #ifdef __KERNEL__ 474 474 /* Function Prototypes */ 475 - int dma_buf_write(pc300_t *, int, ucchar *, int); 476 - int dma_buf_read(pc300_t *, int, struct sk_buff *); 477 475 void tx_dma_start(pc300_t *, int); 478 - void rx_dma_start(pc300_t *, int); 479 - void tx_dma_stop(pc300_t *, int); 480 - void rx_dma_stop(pc300_t *, int); 481 - int cpc_queue_xmit(struct sk_buff *, struct net_device *); 482 - void cpc_net_rx(struct net_device *); 483 - void cpc_sca_status(pc300_t *, int); 484 - int cpc_change_mtu(struct net_device *, int); 485 - int cpc_ioctl(struct net_device *, struct ifreq *, int); 486 - int ch_config(pc300dev_t *); 487 - int rx_config(pc300dev_t *); 488 - int tx_config(pc300dev_t *); 489 - void cpc_opench(pc300dev_t *); 490 - void cpc_closech(pc300dev_t *); 491 476 int cpc_open(struct net_device *dev); 492 - int cpc_close(struct net_device *dev); 493 477 int cpc_set_media(hdlc_device *, int); 494 478 #endif /* __KERNEL__ */ 495 479
+44 -43
drivers/net/wan/pc300_drv.c
··· 291 291 static void plx_init(pc300_t *); 292 292 static void cpc_trace(struct net_device *, struct sk_buff *, char); 293 293 static int cpc_attach(struct net_device *, unsigned short, unsigned short); 294 + static int cpc_close(struct net_device *dev); 294 295 295 296 #ifdef CONFIG_PC300_MLPPP 296 297 void cpc_tty_init(pc300dev_t * dev); ··· 438 437 printk("\n"); 439 438 } 440 439 441 - int dma_get_rx_frame_size(pc300_t * card, int ch) 440 + static int dma_get_rx_frame_size(pc300_t * card, int ch) 442 441 { 443 442 volatile pcsca_bd_t __iomem *ptdescr; 444 443 ucshort first_bd = card->chan[ch].rx_first_bd; ··· 463 462 * dma_buf_write: writes a frame to the Tx DMA buffers 464 463 * NOTE: this function writes one frame at a time. 465 464 */ 466 - int dma_buf_write(pc300_t * card, int ch, ucchar * ptdata, int len) 465 + static int dma_buf_write(pc300_t * card, int ch, ucchar * ptdata, int len) 467 466 { 468 467 int i, nchar; 469 468 volatile pcsca_bd_t __iomem *ptdescr; ··· 504 503 * dma_buf_read: reads a frame from the Rx DMA buffers 505 504 * NOTE: this function reads one frame at a time. 506 505 */ 507 - int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb) 506 + static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb) 508 507 { 509 508 int nchar; 510 509 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; ··· 561 560 return (rcvd); 562 561 } 563 562 564 - void tx_dma_stop(pc300_t * card, int ch) 563 + static void tx_dma_stop(pc300_t * card, int ch) 565 564 { 566 565 void __iomem *scabase = card->hw.scabase; 567 566 ucchar drr_ena_bit = 1 << (5 + 2 * ch); ··· 572 571 cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit); 573 572 } 574 573 575 - void rx_dma_stop(pc300_t * card, int ch) 574 + static void rx_dma_stop(pc300_t * card, int ch) 576 575 { 577 576 void __iomem *scabase = card->hw.scabase; 578 577 ucchar drr_ena_bit = 1 << (4 + 2 * ch); ··· 583 582 cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit); 584 583 } 585 584 586 - void rx_dma_start(pc300_t * card, int ch) 585 + static void rx_dma_start(pc300_t * card, int ch) 587 586 { 588 587 void __iomem *scabase = card->hw.scabase; 589 588 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; ··· 608 607 /*************************/ 609 608 /*** FALC Routines ***/ 610 609 /*************************/ 611 - void falc_issue_cmd(pc300_t * card, int ch, ucchar cmd) 610 + static void falc_issue_cmd(pc300_t * card, int ch, ucchar cmd) 612 611 { 613 612 void __iomem *falcbase = card->hw.falcbase; 614 613 unsigned long i = 0; ··· 623 622 cpc_writeb(falcbase + F_REG(CMDR, ch), cmd); 624 623 } 625 624 626 - void falc_intr_enable(pc300_t * card, int ch) 625 + static void falc_intr_enable(pc300_t * card, int ch) 627 626 { 628 627 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 629 628 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 673 672 } 674 673 } 675 674 676 - void falc_open_timeslot(pc300_t * card, int ch, int timeslot) 675 + static void falc_open_timeslot(pc300_t * card, int ch, int timeslot) 677 676 { 678 677 void __iomem *falcbase = card->hw.falcbase; 679 678 ucchar tshf = card->chan[ch].falc.offset; ··· 689 688 (0x80 >> (timeslot & 0x07))); 690 689 } 691 690 692 - void falc_close_timeslot(pc300_t * card, int ch, int timeslot) 691 + static void falc_close_timeslot(pc300_t * card, int ch, int timeslot) 693 692 { 694 693 void __iomem *falcbase = card->hw.falcbase; 695 694 ucchar tshf = card->chan[ch].falc.offset; ··· 705 704 ~(0x80 >> (timeslot & 0x07))); 706 705 } 707 706 708 - void falc_close_all_timeslots(pc300_t * card, int ch) 707 + static void falc_close_all_timeslots(pc300_t * card, int ch) 709 708 { 710 709 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 711 710 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 727 726 } 728 727 } 729 728 730 - void falc_open_all_timeslots(pc300_t * card, int ch) 729 + static void falc_open_all_timeslots(pc300_t * card, int ch) 731 730 { 732 731 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 733 732 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 759 758 } 760 759 } 761 760 762 - void falc_init_timeslot(pc300_t * card, int ch) 761 + static void falc_init_timeslot(pc300_t * card, int ch) 763 762 { 764 763 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 765 764 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 777 776 } 778 777 } 779 778 780 - void falc_enable_comm(pc300_t * card, int ch) 779 + static void falc_enable_comm(pc300_t * card, int ch) 781 780 { 782 781 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 783 782 falc_t *pfalc = (falc_t *) & chan->falc; ··· 793 792 ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2 * ch))); 794 793 } 795 794 796 - void falc_disable_comm(pc300_t * card, int ch) 795 + static void falc_disable_comm(pc300_t * card, int ch) 797 796 { 798 797 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 799 798 falc_t *pfalc = (falc_t *) & chan->falc; ··· 807 806 ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2 * ch))); 808 807 } 809 808 810 - void falc_init_t1(pc300_t * card, int ch) 809 + static void falc_init_t1(pc300_t * card, int ch) 811 810 { 812 811 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 813 812 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 976 975 falc_close_all_timeslots(card, ch); 977 976 } 978 977 979 - void falc_init_e1(pc300_t * card, int ch) 978 + static void falc_init_e1(pc300_t * card, int ch) 980 979 { 981 980 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 982 981 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1156 1155 falc_close_all_timeslots(card, ch); 1157 1156 } 1158 1157 1159 - void falc_init_hdlc(pc300_t * card, int ch) 1158 + static void falc_init_hdlc(pc300_t * card, int ch) 1160 1159 { 1161 1160 void __iomem *falcbase = card->hw.falcbase; 1162 1161 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; ··· 1182 1181 falc_intr_enable(card, ch); 1183 1182 } 1184 1183 1185 - void te_config(pc300_t * card, int ch) 1184 + static void te_config(pc300_t * card, int ch) 1186 1185 { 1187 1186 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1188 1187 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1242 1241 CPC_UNLOCK(card, flags); 1243 1242 } 1244 1243 1245 - void falc_check_status(pc300_t * card, int ch, unsigned char frs0) 1244 + static void falc_check_status(pc300_t * card, int ch, unsigned char frs0) 1246 1245 { 1247 1246 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1248 1247 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1398 1397 } 1399 1398 } 1400 1399 1401 - void falc_update_stats(pc300_t * card, int ch) 1400 + static void falc_update_stats(pc300_t * card, int ch) 1402 1401 { 1403 1402 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1404 1403 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1451 1450 * the synchronizer and then sent to the system interface. 1452 1451 *---------------------------------------------------------------------------- 1453 1452 */ 1454 - void falc_remote_loop(pc300_t * card, int ch, int loop_on) 1453 + static void falc_remote_loop(pc300_t * card, int ch, int loop_on) 1455 1454 { 1456 1455 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1457 1456 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1496 1495 * coding must be identical. 1497 1496 *---------------------------------------------------------------------------- 1498 1497 */ 1499 - void falc_local_loop(pc300_t * card, int ch, int loop_on) 1498 + static void falc_local_loop(pc300_t * card, int ch, int loop_on) 1500 1499 { 1501 1500 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1502 1501 falc_t *pfalc = (falc_t *) & chan->falc; ··· 1523 1522 * looped. They are originated by the FALC-LH transmitter. 1524 1523 *---------------------------------------------------------------------------- 1525 1524 */ 1526 - void falc_payload_loop(pc300_t * card, int ch, int loop_on) 1525 + static void falc_payload_loop(pc300_t * card, int ch, int loop_on) 1527 1526 { 1528 1527 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1529 1528 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1577 1576 * Description: Turns XLU bit off in the proper register 1578 1577 *---------------------------------------------------------------------------- 1579 1578 */ 1580 - void turn_off_xlu(pc300_t * card, int ch) 1579 + static void turn_off_xlu(pc300_t * card, int ch) 1581 1580 { 1582 1581 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1583 1582 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1598 1597 * Description: Turns XLD bit off in the proper register 1599 1598 *---------------------------------------------------------------------------- 1600 1599 */ 1601 - void turn_off_xld(pc300_t * card, int ch) 1600 + static void turn_off_xld(pc300_t * card, int ch) 1602 1601 { 1603 1602 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1604 1603 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1620 1619 * to generate a LOOP activation code over a T1/E1 line. 1621 1620 *---------------------------------------------------------------------------- 1622 1621 */ 1623 - void falc_generate_loop_up_code(pc300_t * card, int ch) 1622 + static void falc_generate_loop_up_code(pc300_t * card, int ch) 1624 1623 { 1625 1624 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1626 1625 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1653 1652 * to generate a LOOP deactivation code over a T1/E1 line. 1654 1653 *---------------------------------------------------------------------------- 1655 1654 */ 1656 - void falc_generate_loop_down_code(pc300_t * card, int ch) 1655 + static void falc_generate_loop_down_code(pc300_t * card, int ch) 1657 1656 { 1658 1657 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1659 1658 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1683 1682 * it on the reception side. 1684 1683 *---------------------------------------------------------------------------- 1685 1684 */ 1686 - void falc_pattern_test(pc300_t * card, int ch, unsigned int activate) 1685 + static void falc_pattern_test(pc300_t * card, int ch, unsigned int activate) 1687 1686 { 1688 1687 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1689 1688 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 1730 1729 * Description: This routine returns the bit error counter value 1731 1730 *---------------------------------------------------------------------------- 1732 1731 */ 1733 - ucshort falc_pattern_test_error(pc300_t * card, int ch) 1732 + static ucshort falc_pattern_test_error(pc300_t * card, int ch) 1734 1733 { 1735 1734 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1736 1735 falc_t *pfalc = (falc_t *) & chan->falc; ··· 1770 1769 netif_rx(skb); 1771 1770 } 1772 1771 1773 - void cpc_tx_timeout(struct net_device *dev) 1772 + static void cpc_tx_timeout(struct net_device *dev) 1774 1773 { 1775 1774 pc300dev_t *d = (pc300dev_t *) dev->priv; 1776 1775 pc300ch_t *chan = (pc300ch_t *) d->chan; ··· 1798 1797 netif_wake_queue(dev); 1799 1798 } 1800 1799 1801 - int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) 1800 + static int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) 1802 1801 { 1803 1802 pc300dev_t *d = (pc300dev_t *) dev->priv; 1804 1803 pc300ch_t *chan = (pc300ch_t *) d->chan; ··· 1881 1880 return 0; 1882 1881 } 1883 1882 1884 - void cpc_net_rx(struct net_device *dev) 1883 + static void cpc_net_rx(struct net_device *dev) 1885 1884 { 1886 1885 pc300dev_t *d = (pc300dev_t *) dev->priv; 1887 1886 pc300ch_t *chan = (pc300ch_t *) d->chan; ··· 2404 2403 return IRQ_HANDLED; 2405 2404 } 2406 2405 2407 - void cpc_sca_status(pc300_t * card, int ch) 2406 + static void cpc_sca_status(pc300_t * card, int ch) 2408 2407 { 2409 2408 ucchar ilar; 2410 2409 void __iomem *scabase = card->hw.scabase; ··· 2496 2495 } 2497 2496 } 2498 2497 2499 - void cpc_falc_status(pc300_t * card, int ch) 2498 + static void cpc_falc_status(pc300_t * card, int ch) 2500 2499 { 2501 2500 pc300ch_t *chan = &card->chan[ch]; 2502 2501 falc_t *pfalc = (falc_t *) & chan->falc; ··· 2524 2523 CPC_UNLOCK(card, flags); 2525 2524 } 2526 2525 2527 - int cpc_change_mtu(struct net_device *dev, int new_mtu) 2526 + static int cpc_change_mtu(struct net_device *dev, int new_mtu) 2528 2527 { 2529 2528 if ((new_mtu < 128) || (new_mtu > PC300_DEF_MTU)) 2530 2529 return -EINVAL; ··· 2532 2531 return 0; 2533 2532 } 2534 2533 2535 - int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 2534 + static int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 2536 2535 { 2537 2536 hdlc_device *hdlc = dev_to_hdlc(dev); 2538 2537 pc300dev_t *d = (pc300dev_t *) dev->priv; ··· 2857 2856 } 2858 2857 } 2859 2858 2860 - int ch_config(pc300dev_t * d) 2859 + static int ch_config(pc300dev_t * d) 2861 2860 { 2862 2861 pc300ch_t *chan = (pc300ch_t *) d->chan; 2863 2862 pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; ··· 3005 3004 return 0; 3006 3005 } 3007 3006 3008 - int rx_config(pc300dev_t * d) 3007 + static int rx_config(pc300dev_t * d) 3009 3008 { 3010 3009 pc300ch_t *chan = (pc300ch_t *) d->chan; 3011 3010 pc300_t *card = (pc300_t *) chan->card; ··· 3036 3035 return 0; 3037 3036 } 3038 3037 3039 - int tx_config(pc300dev_t * d) 3038 + static int tx_config(pc300dev_t * d) 3040 3039 { 3041 3040 pc300ch_t *chan = (pc300ch_t *) d->chan; 3042 3041 pc300_t *card = (pc300_t *) chan->card; ··· 3099 3098 return 0; 3100 3099 } 3101 3100 3102 - void cpc_opench(pc300dev_t * d) 3101 + static void cpc_opench(pc300dev_t * d) 3103 3102 { 3104 3103 pc300ch_t *chan = (pc300ch_t *) d->chan; 3105 3104 pc300_t *card = (pc300_t *) chan->card; ··· 3117 3116 cpc_readb(scabase + M_REG(CTL, ch)) & ~(CTL_RTS | CTL_DTR)); 3118 3117 } 3119 3118 3120 - void cpc_closech(pc300dev_t * d) 3119 + static void cpc_closech(pc300dev_t * d) 3121 3120 { 3122 3121 pc300ch_t *chan = (pc300ch_t *) d->chan; 3123 3122 pc300_t *card = (pc300_t *) chan->card; ··· 3174 3173 return 0; 3175 3174 } 3176 3175 3177 - int cpc_close(struct net_device *dev) 3176 + static int cpc_close(struct net_device *dev) 3178 3177 { 3179 3178 hdlc_device *hdlc = dev_to_hdlc(dev); 3180 3179 pc300dev_t *d = (pc300dev_t *) dev->priv;
+9 -9
drivers/net/wan/pc300_tty.c
··· 112 112 static struct tty_driver serial_drv; 113 113 114 114 /* local variables */ 115 - st_cpc_tty_area cpc_tty_area[CPC_TTY_NPORTS]; 115 + static st_cpc_tty_area cpc_tty_area[CPC_TTY_NPORTS]; 116 116 117 - int cpc_tty_cnt=0; /* number of intrfaces configured with MLPPP */ 118 - int cpc_tty_unreg_flag = 0; 117 + static int cpc_tty_cnt = 0; /* number of intrfaces configured with MLPPP */ 118 + static int cpc_tty_unreg_flag = 0; 119 119 120 120 /* TTY functions prototype */ 121 121 static int cpc_tty_open(struct tty_struct *tty, struct file *flip); ··· 132 132 static void cpc_tty_signal_off(pc300dev_t *pc300dev, unsigned char); 133 133 static void cpc_tty_signal_on(pc300dev_t *pc300dev, unsigned char); 134 134 135 - int pc300_tiocmset(struct tty_struct *, struct file *, 136 - unsigned int, unsigned int); 137 - int pc300_tiocmget(struct tty_struct *, struct file *); 135 + static int pc300_tiocmset(struct tty_struct *, struct file *, 136 + unsigned int, unsigned int); 137 + static int pc300_tiocmget(struct tty_struct *, struct file *); 138 138 139 139 /* functions called by PC300 driver */ 140 140 void cpc_tty_init(pc300dev_t *dev); ··· 538 538 return(0); 539 539 } 540 540 541 - int pc300_tiocmset(struct tty_struct *tty, struct file *file, 542 - unsigned int set, unsigned int clear) 541 + static int pc300_tiocmset(struct tty_struct *tty, struct file *file, 542 + unsigned int set, unsigned int clear) 543 543 { 544 544 st_cpc_tty_area *cpc_tty; 545 545 ··· 565 565 return 0; 566 566 } 567 567 568 - int pc300_tiocmget(struct tty_struct *tty, struct file *file) 568 + static int pc300_tiocmget(struct tty_struct *tty, struct file *file) 569 569 { 570 570 unsigned int result; 571 571 unsigned char status;
+10 -10
drivers/net/wan/sdla.c
··· 182 182 return(byte); 183 183 } 184 184 185 - void sdla_stop(struct net_device *dev) 185 + static void sdla_stop(struct net_device *dev) 186 186 { 187 187 struct frad_local *flp; 188 188 ··· 209 209 } 210 210 } 211 211 212 - void sdla_start(struct net_device *dev) 212 + static void sdla_start(struct net_device *dev) 213 213 { 214 214 struct frad_local *flp; 215 215 ··· 247 247 * 248 248 ***************************************************/ 249 249 250 - int sdla_z80_poll(struct net_device *dev, int z80_addr, int jiffs, char resp1, char resp2) 250 + static int sdla_z80_poll(struct net_device *dev, int z80_addr, int jiffs, char resp1, char resp2) 251 251 { 252 252 unsigned long start, done, now; 253 253 char resp, *temp; ··· 505 505 506 506 static int sdla_reconfig(struct net_device *dev); 507 507 508 - int sdla_activate(struct net_device *slave, struct net_device *master) 508 + static int sdla_activate(struct net_device *slave, struct net_device *master) 509 509 { 510 510 struct frad_local *flp; 511 511 int i; ··· 527 527 return(0); 528 528 } 529 529 530 - int sdla_deactivate(struct net_device *slave, struct net_device *master) 530 + static int sdla_deactivate(struct net_device *slave, struct net_device *master) 531 531 { 532 532 struct frad_local *flp; 533 533 int i; ··· 549 549 return(0); 550 550 } 551 551 552 - int sdla_assoc(struct net_device *slave, struct net_device *master) 552 + static int sdla_assoc(struct net_device *slave, struct net_device *master) 553 553 { 554 554 struct frad_local *flp; 555 555 int i; ··· 585 585 return(0); 586 586 } 587 587 588 - int sdla_deassoc(struct net_device *slave, struct net_device *master) 588 + static int sdla_deassoc(struct net_device *slave, struct net_device *master) 589 589 { 590 590 struct frad_local *flp; 591 591 int i; ··· 613 613 return(0); 614 614 } 615 615 616 - int sdla_dlci_conf(struct net_device *slave, struct net_device *master, int get) 616 + static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, int get) 617 617 { 618 618 struct frad_local *flp; 619 619 struct dlci_local *dlp; ··· 1324 1324 return(0); 1325 1325 } 1326 1326 1327 - int sdla_change_mtu(struct net_device *dev, int new_mtu) 1327 + static int sdla_change_mtu(struct net_device *dev, int new_mtu) 1328 1328 { 1329 1329 struct frad_local *flp; 1330 1330 ··· 1337 1337 return(-EOPNOTSUPP); 1338 1338 } 1339 1339 1340 - int sdla_set_config(struct net_device *dev, struct ifmap *map) 1340 + static int sdla_set_config(struct net_device *dev, struct ifmap *map) 1341 1341 { 1342 1342 struct frad_local *flp; 1343 1343 int i;
+6 -10
drivers/net/wan/sdladrv.c
··· 642 642 * Enable interrupt generation. 643 643 */ 644 644 645 - EXPORT_SYMBOL(sdla_inten); 646 - 647 - int sdla_inten (sdlahw_t* hw) 645 + static int sdla_inten (sdlahw_t* hw) 648 646 { 649 647 unsigned port = hw->port; 650 648 int tmp, i; ··· 696 698 * Disable interrupt generation. 697 699 */ 698 700 699 - EXPORT_SYMBOL(sdla_intde); 700 - 701 + #if 0 701 702 int sdla_intde (sdlahw_t* hw) 702 703 { 703 704 unsigned port = hw->port; ··· 745 748 } 746 749 return 0; 747 750 } 751 + #endif /* 0 */ 748 752 749 753 /*============================================================================ 750 754 * Acknowledge SDLA hardware interrupt. 751 755 */ 752 756 753 - EXPORT_SYMBOL(sdla_intack); 754 - 755 - int sdla_intack (sdlahw_t* hw) 757 + static int sdla_intack (sdlahw_t* hw) 756 758 { 757 759 unsigned port = hw->port; 758 760 int tmp; ··· 823 827 * Generate an interrupt to adapter's CPU. 824 828 */ 825 829 826 - EXPORT_SYMBOL(sdla_intr); 827 - 830 + #if 0 828 831 int sdla_intr (sdlahw_t* hw) 829 832 { 830 833 unsigned port = hw->port; ··· 858 863 } 859 864 return 0; 860 865 } 866 + #endif /* 0 */ 861 867 862 868 /*============================================================================ 863 869 * Execute Adapter Command.
+3 -7
drivers/net/wan/syncppp.c
··· 221 221 * here. 222 222 */ 223 223 224 - void sppp_input (struct net_device *dev, struct sk_buff *skb) 224 + static void sppp_input (struct net_device *dev, struct sk_buff *skb) 225 225 { 226 226 struct ppp_header *h; 227 227 struct sppp *sp = (struct sppp *)sppp_of(dev); ··· 354 354 sppp_flush_xmit(); 355 355 return; 356 356 } 357 - 358 - EXPORT_SYMBOL(sppp_input); 359 357 360 358 /* 361 359 * Handle transmit packets. ··· 988 990 * the mtu is out of range. 989 991 */ 990 992 991 - int sppp_change_mtu(struct net_device *dev, int new_mtu) 993 + static int sppp_change_mtu(struct net_device *dev, int new_mtu) 992 994 { 993 995 if(new_mtu<128||new_mtu>PPP_MTU||(dev->flags&IFF_UP)) 994 996 return -EINVAL; 995 997 dev->mtu=new_mtu; 996 998 return 0; 997 999 } 998 - 999 - EXPORT_SYMBOL(sppp_change_mtu); 1000 1000 1001 1001 /** 1002 1002 * sppp_do_ioctl - Ioctl handler for ppp/hdlc ··· 1452 1456 return 0; 1453 1457 } 1454 1458 1455 - struct packet_type sppp_packet_type = { 1459 + static struct packet_type sppp_packet_type = { 1456 1460 .type = __constant_htons(ETH_P_WAN_PPP), 1457 1461 .func = sppp_rcv, 1458 1462 };
-1
include/linux/cycx_drv.h
··· 60 60 extern int cycx_poke(struct cycx_hw *hw, u32 addr, void *buf, u32 len); 61 61 extern int cycx_exec(void __iomem *addr); 62 62 63 - extern void cycx_inten(struct cycx_hw *hw); 64 63 extern void cycx_intr(struct cycx_hw *hw); 65 64 #endif /* _CYCX_DRV_H */
-4
include/linux/sdladrv.h
··· 52 52 53 53 extern int sdla_setup (sdlahw_t* hw, void* sfm, unsigned len); 54 54 extern int sdla_down (sdlahw_t* hw); 55 - extern int sdla_inten (sdlahw_t* hw); 56 - extern int sdla_intde (sdlahw_t* hw); 57 - extern int sdla_intack (sdlahw_t* hw); 58 55 extern void S514_intack (sdlahw_t* hw, u32 int_status); 59 56 extern void read_S514_int_stat (sdlahw_t* hw, u32* int_status); 60 - extern int sdla_intr (sdlahw_t* hw); 61 57 extern int sdla_mapmem (sdlahw_t* hw, unsigned long addr); 62 58 extern int sdla_peek (sdlahw_t* hw, unsigned long addr, void* buf, 63 59 unsigned len);
-1
include/net/syncppp.h
··· 86 86 87 87 void sppp_attach (struct ppp_device *pd); 88 88 void sppp_detach (struct net_device *dev); 89 - void sppp_input (struct net_device *dev, struct sk_buff *m); 90 89 int sppp_do_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd); 91 90 struct sk_buff *sppp_dequeue (struct net_device *dev); 92 91 int sppp_isempty (struct net_device *dev);