diff options
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/Kconfig | 4 | ||||
-rw-r--r-- | drivers/net/wan/c101.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/dlci.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/dscc4.c | 9 | ||||
-rw-r--r-- | drivers/net/wan/hd64570.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/hd64572.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/hdlc_raw_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/n2.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/pc300_drv.c | 13 | ||||
-rw-r--r-- | drivers/net/wan/pc300_tty.c | 18 | ||||
-rw-r--r-- | drivers/net/wan/pc300too.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/pci200syn.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/sdla.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/wanxl.c | 1 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 5 |
18 files changed, 11 insertions, 59 deletions
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig index 423eb26386c8..d70ede7a7f96 100644 --- a/drivers/net/wan/Kconfig +++ b/drivers/net/wan/Kconfig @@ -290,8 +290,8 @@ config FARSYNC Frame Relay or X.25/LAPB. If you want the module to be automatically loaded when the interface - is referenced then you should add "alias hdlcX farsync" to - /etc/modprobe.conf for each interface, where X is 0, 1, 2, ..., or + is referenced then you should add "alias hdlcX farsync" to a file + in /etc/modprobe.d/ for each interface, where X is 0, 1, 2, ..., or simply use "alias hdlc* farsync" to indicate all of them. To compile this driver as a module, choose M here: the diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c index 54f995f4a5a3..09a50751763b 100644 --- a/drivers/net/wan/c101.c +++ b/drivers/net/wan/c101.c @@ -325,10 +325,8 @@ static int __init c101_run(unsigned long irq, unsigned long winbase) } card = kzalloc(sizeof(card_t), GFP_KERNEL); - if (card == NULL) { - pr_err("unable to allocate memory\n"); + if (card == NULL) return -ENOBUFS; - } card->dev = alloc_hdlcdev(card); if (!card->dev) { diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c index 48ab38a34c5a..147614ed86aa 100644 --- a/drivers/net/wan/dlci.c +++ b/drivers/net/wan/dlci.c @@ -50,7 +50,6 @@ #include <net/sock.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/dma.h> #include <asm/uaccess.h> diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c index 058e1697c174..c676de7de024 100644 --- a/drivers/net/wan/dscc4.c +++ b/drivers/net/wan/dscc4.c @@ -93,7 +93,6 @@ #include <linux/mm.h> #include <linux/slab.h> -#include <asm/system.h> #include <asm/cache.h> #include <asm/byteorder.h> #include <asm/uaccess.h> @@ -903,10 +902,8 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) int i, ret = -ENOMEM; root = kcalloc(dev_per_card, sizeof(*root), GFP_KERNEL); - if (!root) { - pr_err("can't allocate data\n"); + if (!root) goto err_out; - } for (i = 0; i < dev_per_card; i++) { root[i].dev = alloc_hdlcdev(root + i); @@ -915,10 +912,8 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr) } ppriv = kzalloc(sizeof(*ppriv), GFP_KERNEL); - if (!ppriv) { - pr_err("can't allocate private data\n"); + if (!ppriv) goto err_free_dev; - } ppriv->root = root; spin_lock_init(&ppriv->lock); diff --git a/drivers/net/wan/hd64570.c b/drivers/net/wan/hd64570.c index 33b67d88fceb..cf4903355a34 100644 --- a/drivers/net/wan/hd64570.c +++ b/drivers/net/wan/hd64570.c @@ -40,7 +40,6 @@ #include <linux/string.h> #include <linux/types.h> #include <asm/io.h> -#include <asm/system.h> #include <asm/uaccess.h> #include "hd64570.h" diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c index efc0db101183..e2779faa6c4f 100644 --- a/drivers/net/wan/hd64572.c +++ b/drivers/net/wan/hd64572.c @@ -40,7 +40,6 @@ #include <linux/string.h> #include <linux/types.h> #include <asm/io.h> -#include <asm/system.h> #include <asm/uaccess.h> #include "hd64572.h" diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index eb2028187fbe..7c6cb4f31798 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -1087,7 +1087,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) } if (type == ARPHRD_ETHER) - random_ether_addr(dev->dev_addr); + eth_hw_addr_random(dev); else { *(__be16*)dev->dev_addr = htons(dlci); dlci_to_q922(dev->broadcast, dlci); diff --git a/drivers/net/wan/hdlc_raw_eth.c b/drivers/net/wan/hdlc_raw_eth.c index 05c9b0b96239..3ab72b3082de 100644 --- a/drivers/net/wan/hdlc_raw_eth.c +++ b/drivers/net/wan/hdlc_raw_eth.c @@ -101,7 +101,7 @@ static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr) old_qlen = dev->tx_queue_len; ether_setup(dev); dev->tx_queue_len = old_qlen; - random_ether_addr(dev->dev_addr); + eth_hw_addr_random(dev); netif_dormant_off(dev); return 0; } diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index 7beeb9b88a3b..a73b49eb87e3 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -35,7 +35,6 @@ #include <linux/if_arp.h> #include <linux/skbuff.h> #include <net/sock.h> -#include <asm/system.h> #include <asm/uaccess.h> #include <linux/mm.h> #include <linux/interrupt.h> diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index b7f2358d23be..76a8a4a522e9 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c @@ -497,7 +497,6 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/ data = kmalloc(xc.len, GFP_KERNEL); if (!data) { - printk(KERN_WARNING "%s: Failed to allocate memory for copy\n", dev->name); ret = -ENOMEM; break; } diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 5129ad514d26..315bf09d6a20 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c @@ -358,10 +358,8 @@ static int __init n2_run(unsigned long io, unsigned long irq, } card = kzalloc(sizeof(card_t), GFP_KERNEL); - if (card == NULL) { - pr_err("unable to allocate memory\n"); + if (card == NULL) return -ENOBUFS; - } card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); card->ports[1].dev = alloc_hdlcdev(&card->ports[1]); diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 1eeedd6a10b1..cb0f8d932b0c 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c @@ -299,7 +299,6 @@ void cpc_tty_init(pc300dev_t * dev); void cpc_tty_unregister_service(pc300dev_t * pc300dev); void cpc_tty_receive(pc300dev_t * pc300dev); void cpc_tty_trigger_poll(pc300dev_t * pc300dev); -void cpc_tty_reset_var(void); #endif /************************/ @@ -3232,7 +3231,7 @@ static void plx_init(pc300_t * card) } -static inline void show_version(void) +static void show_version(void) { char *rcsvers, *rcsdate, *tmp; @@ -3413,19 +3412,10 @@ static void cpc_init_card(pc300_t * card) static int __devinit cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - static int first_time = 1; int err, eeprom_outdated = 0; u16 device_id; pc300_t *card; - if (first_time) { - first_time = 0; - show_version(); -#ifdef CONFIG_PC300_MLPPP - cpc_tty_reset_var(); -#endif - } - if ((err = pci_enable_device(pdev)) < 0) return err; @@ -3661,6 +3651,7 @@ static struct pci_driver cpc_driver = { static int __init cpc_init(void) { + show_version(); return pci_register_driver(&cpc_driver); } diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c index d47d2cd10475..4709f4228561 100644 --- a/drivers/net/wan/pc300_tty.c +++ b/drivers/net/wan/pc300_tty.c @@ -139,7 +139,6 @@ void cpc_tty_init(pc300dev_t *dev); void cpc_tty_unregister_service(pc300dev_t *pc300dev); void cpc_tty_receive(pc300dev_t *pc300dev); void cpc_tty_trigger_poll(pc300dev_t *pc300dev); -void cpc_tty_reset_var(void); /* * PC300 TTY clear "signal" @@ -1078,20 +1077,3 @@ void cpc_tty_trigger_poll(pc300dev_t *pc300dev) } schedule_work(&(cpc_tty->tty_tx_work)); } - -/* - * PC300 TTY reset var routine - * This routine is called by pc300driver to init the TTY area. - */ - -void cpc_tty_reset_var(void) -{ - int i ; - - CPC_TTY_DBG("hdlcX-tty: reset variables\n"); - /* reset the tty_driver structure - serial_drv */ - memset(&serial_drv, 0, sizeof(struct tty_driver)); - for (i=0; i < CPC_TTY_NPORTS; i++){ - memset(&cpc_tty_area[i],0, sizeof(st_cpc_tty_area)); - } -} diff --git a/drivers/net/wan/pc300too.c b/drivers/net/wan/pc300too.c index c49c1b3c7aad..5fe246e060d7 100644 --- a/drivers/net/wan/pc300too.c +++ b/drivers/net/wan/pc300too.c @@ -320,7 +320,6 @@ static int __devinit pc300_pci_init_one(struct pci_dev *pdev, card = kzalloc(sizeof(card_t), GFP_KERNEL); if (card == NULL) { - pr_err("unable to allocate memory\n"); pci_release_regions(pdev); pci_disable_device(pdev); return -ENOBUFS; diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c index 1ce21163c776..9659fcaa34ed 100644 --- a/drivers/net/wan/pci200syn.c +++ b/drivers/net/wan/pci200syn.c @@ -299,7 +299,6 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev, card = kzalloc(sizeof(card_t), GFP_KERNEL); if (card == NULL) { - pr_err("unable to allocate memory\n"); pci_release_regions(pdev); pci_disable_device(pdev); return -ENOBUFS; diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index c8531612eea9..de3bbf43fc5a 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c @@ -54,7 +54,6 @@ #include <linux/sdla.h> #include <linux/bitops.h> -#include <asm/system.h> #include <asm/io.h> #include <asm/dma.h> #include <asm/uaccess.h> diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 44b707197258..feb7541b33fb 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -604,7 +604,6 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev, alloc_size = sizeof(card_t) + ports * sizeof(port_t); card = kzalloc(alloc_size, GFP_KERNEL); if (card == NULL) { - pr_err("%s: unable to allocate memory\n", pci_name(pdev)); pci_release_regions(pdev); pci_disable_device(pdev); return -ENOBUFS; diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 8a10bb730d5a..d7a65e141d1a 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -18,7 +18,6 @@ #include <linux/module.h> -#include <asm/system.h> #include <linux/uaccess.h> #include <linux/bitops.h> #include <linux/string.h> @@ -786,10 +785,8 @@ static int __init init_x25_asy(void) x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), GFP_KERNEL); - if (!x25_asy_devs) { - pr_warn("Can't allocate x25_asy_ctrls[] array! Uaargh! (-> No X.25 available)\n"); + if (!x25_asy_devs) return -ENOMEM; - } return tty_register_ldisc(N_X25, &x25_ldisc); } |