aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 14:47:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-23 14:47:02 -0400
commit5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch)
tree7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /drivers/net/wan
parent02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff)
parentec37a48d1d16c30b655ac5280209edf52a6775d4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits) bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL. vlan: Calling vlan_hwaccel_do_receive() is always valid. tproxy: use the interface primary IP address as a default value for --on-ip tproxy: added IPv6 support to the socket match cxgb3: function namespace cleanup tproxy: added IPv6 support to the TPROXY target tproxy: added IPv6 socket lookup function to nf_tproxy_core be2net: Changes to use only priority codes allowed by f/w tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled tproxy: added tproxy sockopt interface in the IPV6 layer tproxy: added udp6_lib_lookup function tproxy: added const specifiers to udp lookup functions tproxy: split off ipv6 defragmentation to a separate module l2tp: small cleanup nf_nat: restrict ICMP translation for embedded header can: mcp251x: fix generation of error frames can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set can-raw: add msg_flags to distinguish local traffic 9p: client code cleanup rds: make local functions/variables static ... Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/c101.c2
-rw-r--r--drivers/net/wan/cycx_drv.c14
-rw-r--r--drivers/net/wan/cycx_main.c6
-rw-r--r--drivers/net/wan/dlci.c42
-rw-r--r--drivers/net/wan/hdlc_cisco.c4
-rw-r--r--drivers/net/wan/lapbether.c2
-rw-r--r--drivers/net/wan/lmc/lmc_main.c6
-rw-r--r--drivers/net/wan/n2.c6
-rw-r--r--drivers/net/wan/pc300_drv.c20
-rw-r--r--drivers/net/wan/pc300_tty.c2
-rw-r--r--drivers/net/wan/pci200syn.c2
-rw-r--r--drivers/net/wan/sdla.c108
-rw-r--r--drivers/net/wan/x25_asy.c2
-rw-r--r--drivers/net/wan/z85230.c4
14 files changed, 111 insertions, 109 deletions
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
index 0bd898c94759..4ac85a09c5a6 100644
--- a/drivers/net/wan/c101.c
+++ b/drivers/net/wan/c101.c
@@ -264,7 +264,7 @@ static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
264 new_line.clock_type != CLOCK_TXFROMRX && 264 new_line.clock_type != CLOCK_TXFROMRX &&
265 new_line.clock_type != CLOCK_INT && 265 new_line.clock_type != CLOCK_INT &&
266 new_line.clock_type != CLOCK_TXINT) 266 new_line.clock_type != CLOCK_TXINT)
267 return -EINVAL; /* No such clock setting */ 267 return -EINVAL; /* No such clock setting */
268 268
269 if (new_line.loopback != 0 && new_line.loopback != 1) 269 if (new_line.loopback != 0 && new_line.loopback != 1)
270 return -EINVAL; 270 return -EINVAL;
diff --git a/drivers/net/wan/cycx_drv.c b/drivers/net/wan/cycx_drv.c
index a5ddc6c8963e..164c3624ba89 100644
--- a/drivers/net/wan/cycx_drv.c
+++ b/drivers/net/wan/cycx_drv.c
@@ -73,7 +73,7 @@ static int reset_cyc2x(void __iomem *addr);
73static int detect_cyc2x(void __iomem *addr); 73static int detect_cyc2x(void __iomem *addr);
74 74
75/* Miscellaneous functions */ 75/* Miscellaneous functions */
76static int get_option_index(long *optlist, long optval); 76static int get_option_index(const long *optlist, long optval);
77static u16 checksum(u8 *buf, u32 len); 77static u16 checksum(u8 *buf, u32 len);
78 78
79#define wait_cyc(addr) cycx_exec(addr + CMD_OFFSET) 79#define wait_cyc(addr) cycx_exec(addr + CMD_OFFSET)
@@ -81,23 +81,23 @@ static u16 checksum(u8 *buf, u32 len);
81/* Global Data */ 81/* Global Data */
82 82
83/* private data */ 83/* private data */
84static char modname[] = "cycx_drv"; 84static const char modname[] = "cycx_drv";
85static char fullname[] = "Cyclom 2X Support Module"; 85static const char fullname[] = "Cyclom 2X Support Module";
86static char copyright[] = "(c) 1998-2003 Arnaldo Carvalho de Melo " 86static const char copyright[] = "(c) 1998-2003 Arnaldo Carvalho de Melo "
87 "<acme@conectiva.com.br>"; 87 "<acme@conectiva.com.br>";
88 88
89/* Hardware configuration options. 89/* Hardware configuration options.
90 * These are arrays of configuration options used by verification routines. 90 * These are arrays of configuration options used by verification routines.
91 * The first element of each array is its size (i.e. number of options). 91 * The first element of each array is its size (i.e. number of options).
92 */ 92 */
93static long cyc2x_dpmbase_options[] = { 93static const long cyc2x_dpmbase_options[] = {
94 20, 94 20,
95 0xA0000, 0xA4000, 0xA8000, 0xAC000, 0xB0000, 0xB4000, 0xB8000, 95 0xA0000, 0xA4000, 0xA8000, 0xAC000, 0xB0000, 0xB4000, 0xB8000,
96 0xBC000, 0xC0000, 0xC4000, 0xC8000, 0xCC000, 0xD0000, 0xD4000, 96 0xBC000, 0xC0000, 0xC4000, 0xC8000, 0xCC000, 0xD0000, 0xD4000,
97 0xD8000, 0xDC000, 0xE0000, 0xE4000, 0xE8000, 0xEC000 97 0xD8000, 0xDC000, 0xE0000, 0xE4000, 0xE8000, 0xEC000
98}; 98};
99 99
100static long cycx_2x_irq_options[] = { 7, 3, 5, 9, 10, 11, 12, 15 }; 100static const long cycx_2x_irq_options[] = { 7, 3, 5, 9, 10, 11, 12, 15 };
101 101
102/* Kernel Loadable Module Entry Points */ 102/* Kernel Loadable Module Entry Points */
103/* Module 'insert' entry point. 103/* Module 'insert' entry point.
@@ -529,7 +529,7 @@ static int detect_cyc2x(void __iomem *addr)
529/* Miscellaneous */ 529/* Miscellaneous */
530/* Get option's index into the options list. 530/* Get option's index into the options list.
531 * Return option's index (1 .. N) or zero if option is invalid. */ 531 * Return option's index (1 .. N) or zero if option is invalid. */
532static int get_option_index(long *optlist, long optval) 532static int get_option_index(const long *optlist, long optval)
533{ 533{
534 int i = 1; 534 int i = 1;
535 535
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
index a0e8611ad8e8..859dba9b972e 100644
--- a/drivers/net/wan/cycx_main.c
+++ b/drivers/net/wan/cycx_main.c
@@ -81,9 +81,9 @@ static irqreturn_t cycx_isr(int irq, void *dev_id);
81 */ 81 */
82 82
83/* private data */ 83/* private data */
84static char cycx_drvname[] = "cyclomx"; 84static const char cycx_drvname[] = "cyclomx";
85static char cycx_fullname[] = "CYCLOM 2X(tm) Sync Card Driver"; 85static const char cycx_fullname[] = "CYCLOM 2X(tm) Sync Card Driver";
86static char cycx_copyright[] = "(c) 1998-2003 Arnaldo Carvalho de Melo " 86static const char cycx_copyright[] = "(c) 1998-2003 Arnaldo Carvalho de Melo "
87 "<acme@conectiva.com.br>"; 87 "<acme@conectiva.com.br>";
88static int cycx_ncards = CONFIG_CYCX_CARDS; 88static int cycx_ncards = CONFIG_CYCX_CARDS;
89static struct cycx_device *cycx_card_array; /* adapter data space */ 89static struct cycx_device *cycx_card_array; /* adapter data space */
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 421d0715310e..1481a446fefb 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -97,11 +97,11 @@ static int dlci_header(struct sk_buff *skb, struct net_device *dev,
97 97
98 dest = skb_push(skb, hlen); 98 dest = skb_push(skb, hlen);
99 if (!dest) 99 if (!dest)
100 return(0); 100 return 0;
101 101
102 memcpy(dest, &hdr, hlen); 102 memcpy(dest, &hdr, hlen);
103 103
104 return(hlen); 104 return hlen;
105} 105}
106 106
107static void dlci_receive(struct sk_buff *skb, struct net_device *dev) 107static void dlci_receive(struct sk_buff *skb, struct net_device *dev)
@@ -211,14 +211,14 @@ static int dlci_config(struct net_device *dev, struct dlci_conf __user *conf, in
211 if (copy_from_user(&config, conf, sizeof(struct dlci_conf))) 211 if (copy_from_user(&config, conf, sizeof(struct dlci_conf)))
212 return -EFAULT; 212 return -EFAULT;
213 if (config.flags & ~DLCI_VALID_FLAGS) 213 if (config.flags & ~DLCI_VALID_FLAGS)
214 return(-EINVAL); 214 return -EINVAL;
215 memcpy(&dlp->config, &config, sizeof(struct dlci_conf)); 215 memcpy(&dlp->config, &config, sizeof(struct dlci_conf));
216 dlp->configured = 1; 216 dlp->configured = 1;
217 } 217 }
218 218
219 err = (*flp->dlci_conf)(dlp->slave, dev, get); 219 err = (*flp->dlci_conf)(dlp->slave, dev, get);
220 if (err) 220 if (err)
221 return(err); 221 return err;
222 222
223 if (get) 223 if (get)
224 { 224 {
@@ -226,7 +226,7 @@ static int dlci_config(struct net_device *dev, struct dlci_conf __user *conf, in
226 return -EFAULT; 226 return -EFAULT;
227 } 227 }
228 228
229 return(0); 229 return 0;
230} 230}
231 231
232static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 232static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -234,7 +234,7 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
234 struct dlci_local *dlp; 234 struct dlci_local *dlp;
235 235
236 if (!capable(CAP_NET_ADMIN)) 236 if (!capable(CAP_NET_ADMIN))
237 return(-EPERM); 237 return -EPERM;
238 238
239 dlp = netdev_priv(dev); 239 dlp = netdev_priv(dev);
240 240
@@ -242,7 +242,7 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
242 { 242 {
243 case DLCI_GET_SLAVE: 243 case DLCI_GET_SLAVE:
244 if (!*(short *)(dev->dev_addr)) 244 if (!*(short *)(dev->dev_addr))
245 return(-EINVAL); 245 return -EINVAL;
246 246
247 strncpy(ifr->ifr_slave, dlp->slave->name, sizeof(ifr->ifr_slave)); 247 strncpy(ifr->ifr_slave, dlp->slave->name, sizeof(ifr->ifr_slave));
248 break; 248 break;
@@ -250,15 +250,15 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
250 case DLCI_GET_CONF: 250 case DLCI_GET_CONF:
251 case DLCI_SET_CONF: 251 case DLCI_SET_CONF:
252 if (!*(short *)(dev->dev_addr)) 252 if (!*(short *)(dev->dev_addr))
253 return(-EINVAL); 253 return -EINVAL;
254 254
255 return(dlci_config(dev, ifr->ifr_data, cmd == DLCI_GET_CONF)); 255 return dlci_config(dev, ifr->ifr_data, cmd == DLCI_GET_CONF);
256 break; 256 break;
257 257
258 default: 258 default:
259 return(-EOPNOTSUPP); 259 return -EOPNOTSUPP;
260 } 260 }
261 return(0); 261 return 0;
262} 262}
263 263
264static int dlci_change_mtu(struct net_device *dev, int new_mtu) 264static int dlci_change_mtu(struct net_device *dev, int new_mtu)
@@ -277,15 +277,15 @@ static int dlci_open(struct net_device *dev)
277 dlp = netdev_priv(dev); 277 dlp = netdev_priv(dev);
278 278
279 if (!*(short *)(dev->dev_addr)) 279 if (!*(short *)(dev->dev_addr))
280 return(-EINVAL); 280 return -EINVAL;
281 281
282 if (!netif_running(dlp->slave)) 282 if (!netif_running(dlp->slave))
283 return(-ENOTCONN); 283 return -ENOTCONN;
284 284
285 flp = netdev_priv(dlp->slave); 285 flp = netdev_priv(dlp->slave);
286 err = (*flp->activate)(dlp->slave, dev); 286 err = (*flp->activate)(dlp->slave, dev);
287 if (err) 287 if (err)
288 return(err); 288 return err;
289 289
290 netif_start_queue(dev); 290 netif_start_queue(dev);
291 291
@@ -365,14 +365,14 @@ static int dlci_add(struct dlci_add *dlci)
365 list_add(&dlp->list, &dlci_devs); 365 list_add(&dlp->list, &dlci_devs);
366 rtnl_unlock(); 366 rtnl_unlock();
367 367
368 return(0); 368 return 0;
369 369
370 err2: 370 err2:
371 rtnl_unlock(); 371 rtnl_unlock();
372 free_netdev(master); 372 free_netdev(master);
373 err1: 373 err1:
374 dev_put(slave); 374 dev_put(slave);
375 return(err); 375 return err;
376} 376}
377 377
378static int dlci_del(struct dlci_add *dlci) 378static int dlci_del(struct dlci_add *dlci)
@@ -385,10 +385,10 @@ static int dlci_del(struct dlci_add *dlci)
385 /* validate slave device */ 385 /* validate slave device */
386 master = __dev_get_by_name(&init_net, dlci->devname); 386 master = __dev_get_by_name(&init_net, dlci->devname);
387 if (!master) 387 if (!master)
388 return(-ENODEV); 388 return -ENODEV;
389 389
390 if (netif_running(master)) { 390 if (netif_running(master)) {
391 return(-EBUSY); 391 return -EBUSY;
392 } 392 }
393 393
394 dlp = netdev_priv(master); 394 dlp = netdev_priv(master);
@@ -406,7 +406,7 @@ static int dlci_del(struct dlci_add *dlci)
406 } 406 }
407 rtnl_unlock(); 407 rtnl_unlock();
408 408
409 return(err); 409 return err;
410} 410}
411 411
412static int dlci_ioctl(unsigned int cmd, void __user *arg) 412static int dlci_ioctl(unsigned int cmd, void __user *arg)
@@ -415,7 +415,7 @@ static int dlci_ioctl(unsigned int cmd, void __user *arg)
415 int err; 415 int err;
416 416
417 if (!capable(CAP_NET_ADMIN)) 417 if (!capable(CAP_NET_ADMIN))
418 return(-EPERM); 418 return -EPERM;
419 419
420 if (copy_from_user(&add, arg, sizeof(struct dlci_add))) 420 if (copy_from_user(&add, arg, sizeof(struct dlci_add)))
421 return -EFAULT; 421 return -EFAULT;
@@ -438,7 +438,7 @@ static int dlci_ioctl(unsigned int cmd, void __user *arg)
438 err = -EINVAL; 438 err = -EINVAL;
439 } 439 }
440 440
441 return(err); 441 return err;
442} 442}
443 443
444static const struct header_ops dlci_header_ops = { 444static const struct header_ops dlci_header_ops = {
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c
index b38ffa149aba..b1e5e5b69c2a 100644
--- a/drivers/net/wan/hdlc_cisco.c
+++ b/drivers/net/wan/hdlc_cisco.c
@@ -191,7 +191,8 @@ static int cisco_rx(struct sk_buff *skb)
191 191
192 switch (ntohl (cisco_data->type)) { 192 switch (ntohl (cisco_data->type)) {
193 case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */ 193 case CISCO_ADDR_REQ: /* Stolen from syncppp.c :-) */
194 in_dev = dev->ip_ptr; 194 rcu_read_lock();
195 in_dev = __in_dev_get_rcu(dev);
195 addr = 0; 196 addr = 0;
196 mask = ~cpu_to_be32(0); /* is the mask correct? */ 197 mask = ~cpu_to_be32(0); /* is the mask correct? */
197 198
@@ -211,6 +212,7 @@ static int cisco_rx(struct sk_buff *skb)
211 cisco_keepalive_send(dev, CISCO_ADDR_REPLY, 212 cisco_keepalive_send(dev, CISCO_ADDR_REPLY,
212 addr, mask); 213 addr, mask);
213 } 214 }
215 rcu_read_unlock();
214 dev_kfree_skb_any(skb); 216 dev_kfree_skb_any(skb);
215 return NET_RX_SUCCESS; 217 return NET_RX_SUCCESS;
216 218
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index 4d4dc38c7290..7f5bb913c8b9 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -46,7 +46,7 @@
46 46
47#include <net/x25device.h> 47#include <net/x25device.h>
48 48
49static char bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 49static const u8 bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
50 50
51/* If this number is made larger, check that the temporary string buffer 51/* If this number is made larger, check that the temporary string buffer
52 * in lapbeth_new_device is large enough to store the probe device name.*/ 52 * in lapbeth_new_device is large enough to store the probe device name.*/
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index e2c6f7f4f51c..70feb84df670 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -1022,7 +1022,7 @@ static int lmc_open(struct net_device *dev)
1022 1022
1023 if (sc->lmc_ok){ 1023 if (sc->lmc_ok){
1024 lmc_trace(dev, "lmc_open lmc_ok out"); 1024 lmc_trace(dev, "lmc_open lmc_ok out");
1025 return (0); 1025 return 0;
1026 } 1026 }
1027 1027
1028 lmc_softreset (sc); 1028 lmc_softreset (sc);
@@ -1105,12 +1105,12 @@ static int lmc_open(struct net_device *dev)
1105 init_timer (&sc->timer); 1105 init_timer (&sc->timer);
1106 sc->timer.expires = jiffies + HZ; 1106 sc->timer.expires = jiffies + HZ;
1107 sc->timer.data = (unsigned long) dev; 1107 sc->timer.data = (unsigned long) dev;
1108 sc->timer.function = &lmc_watchdog; 1108 sc->timer.function = lmc_watchdog;
1109 add_timer (&sc->timer); 1109 add_timer (&sc->timer);
1110 1110
1111 lmc_trace(dev, "lmc_open out"); 1111 lmc_trace(dev, "lmc_open out");
1112 1112
1113 return (0); 1113 return 0;
1114} 1114}
1115 1115
1116/* Total reset to compensate for the AdTran DSU doing bad things 1116/* Total reset to compensate for the AdTran DSU doing bad things
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c
index 5394b51bdb2f..17d408fe693f 100644
--- a/drivers/net/wan/n2.c
+++ b/drivers/net/wan/n2.c
@@ -282,7 +282,7 @@ static int n2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
282 new_line.clock_type != CLOCK_TXFROMRX && 282 new_line.clock_type != CLOCK_TXFROMRX &&
283 new_line.clock_type != CLOCK_INT && 283 new_line.clock_type != CLOCK_INT &&
284 new_line.clock_type != CLOCK_TXINT) 284 new_line.clock_type != CLOCK_TXINT)
285 return -EINVAL; /* No such clock setting */ 285 return -EINVAL; /* No such clock setting */
286 286
287 if (new_line.loopback != 0 && new_line.loopback != 1) 287 if (new_line.loopback != 0 && new_line.loopback != 1)
288 return -EINVAL; 288 return -EINVAL;
@@ -379,14 +379,14 @@ static int __init n2_run(unsigned long io, unsigned long irq,
379 if (request_irq(irq, sca_intr, 0, devname, card)) { 379 if (request_irq(irq, sca_intr, 0, devname, card)) {
380 printk(KERN_ERR "n2: could not allocate IRQ\n"); 380 printk(KERN_ERR "n2: could not allocate IRQ\n");
381 n2_destroy_card(card); 381 n2_destroy_card(card);
382 return(-EBUSY); 382 return -EBUSY;
383 } 383 }
384 card->irq = irq; 384 card->irq = irq;
385 385
386 if (!request_mem_region(winbase, USE_WINDOWSIZE, devname)) { 386 if (!request_mem_region(winbase, USE_WINDOWSIZE, devname)) {
387 printk(KERN_ERR "n2: could not request RAM window\n"); 387 printk(KERN_ERR "n2: could not request RAM window\n");
388 n2_destroy_card(card); 388 n2_destroy_card(card);
389 return(-EBUSY); 389 return -EBUSY;
390 } 390 }
391 card->phy_winbase = winbase; 391 card->phy_winbase = winbase;
392 card->winbase = ioremap(winbase, USE_WINDOWSIZE); 392 card->winbase = ioremap(winbase, USE_WINDOWSIZE);
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index c6aa66e5b52f..f875cfae3093 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -1,5 +1,5 @@
1#define USE_PCI_CLOCK 1#define USE_PCI_CLOCK
2static char rcsid[] = 2static const char rcsid[] =
3"Revision: 3.4.5 Date: 2002/03/07 "; 3"Revision: 3.4.5 Date: 2002/03/07 ";
4 4
5/* 5/*
@@ -451,11 +451,11 @@ static int dma_get_rx_frame_size(pc300_t * card, int ch)
451 if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) { 451 if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) {
452 /* Return the size of a good frame or incomplete bad frame 452 /* Return the size of a good frame or incomplete bad frame
453 * (dma_buf_read will clean the buffer descriptors in this case). */ 453 * (dma_buf_read will clean the buffer descriptors in this case). */
454 return (rcvd); 454 return rcvd;
455 } 455 }
456 ptdescr = (card->hw.rambase + cpc_readl(&ptdescr->next)); 456 ptdescr = (card->hw.rambase + cpc_readl(&ptdescr->next));
457 } 457 }
458 return (-1); 458 return -1;
459} 459}
460 460
461/* 461/*
@@ -557,7 +557,7 @@ static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb)
557 cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch), 557 cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch),
558 RX_BD_ADDR(ch, chan->rx_last_bd)); 558 RX_BD_ADDR(ch, chan->rx_last_bd));
559 } 559 }
560 return (rcvd); 560 return rcvd;
561} 561}
562 562
563static void tx_dma_stop(pc300_t * card, int ch) 563static void tx_dma_stop(pc300_t * card, int ch)
@@ -1733,7 +1733,7 @@ static u16 falc_pattern_test_error(pc300_t * card, int ch)
1733 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1733 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch];
1734 falc_t *pfalc = (falc_t *) & chan->falc; 1734 falc_t *pfalc = (falc_t *) & chan->falc;
1735 1735
1736 return (pfalc->bec); 1736 return pfalc->bec;
1737} 1737}
1738 1738
1739/**********************************/ 1739/**********************************/
@@ -2819,7 +2819,7 @@ static int clock_rate_calc(u32 rate, u32 clock, int *br_io)
2819 *br_io = 0; 2819 *br_io = 0;
2820 2820
2821 if (rate == 0) 2821 if (rate == 0)
2822 return (0); 2822 return 0;
2823 2823
2824 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) { 2824 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) {
2825 if ((tc = clock / br_pwr / rate) <= 0xff) { 2825 if ((tc = clock / br_pwr / rate) <= 0xff) {
@@ -2832,11 +2832,11 @@ static int clock_rate_calc(u32 rate, u32 clock, int *br_io)
2832 error = ((rate - (clock / br_pwr / rate)) / rate) * 1000; 2832 error = ((rate - (clock / br_pwr / rate)) / rate) * 1000;
2833 /* Errors bigger than +/- 1% won't be tolerated */ 2833 /* Errors bigger than +/- 1% won't be tolerated */
2834 if (error < -10 || error > 10) 2834 if (error < -10 || error > 10)
2835 return (-1); 2835 return -1;
2836 else 2836 else
2837 return (tc); 2837 return tc;
2838 } else { 2838 } else {
2839 return (-1); 2839 return -1;
2840 } 2840 }
2841} 2841}
2842 2842
@@ -3207,7 +3207,7 @@ static u32 detect_ram(pc300_t * card)
3207 break; 3207 break;
3208 } 3208 }
3209 } 3209 }
3210 return (i); 3210 return i;
3211} 3211}
3212 3212
3213static void plx_init(pc300_t * card) 3213static void plx_init(pc300_t * card)
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
index 4293889e287e..515d9b8af01e 100644
--- a/drivers/net/wan/pc300_tty.c
+++ b/drivers/net/wan/pc300_tty.c
@@ -540,7 +540,7 @@ static int cpc_tty_chars_in_buffer(struct tty_struct *tty)
540 return -ENODEV; 540 return -ENODEV;
541 } 541 }
542 542
543 return(0); 543 return 0;
544} 544}
545 545
546static int pc300_tiocmset(struct tty_struct *tty, struct file *file, 546static int pc300_tiocmset(struct tty_struct *tty, struct file *file,
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c
index e2cff64a446a..fd7375955e41 100644
--- a/drivers/net/wan/pci200syn.c
+++ b/drivers/net/wan/pci200syn.c
@@ -220,7 +220,7 @@ static int pci200_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
220 new_line.clock_type != CLOCK_TXFROMRX && 220 new_line.clock_type != CLOCK_TXFROMRX &&
221 new_line.clock_type != CLOCK_INT && 221 new_line.clock_type != CLOCK_INT &&
222 new_line.clock_type != CLOCK_TXINT) 222 new_line.clock_type != CLOCK_TXINT)
223 return -EINVAL; /* No such clock setting */ 223 return -EINVAL; /* No such clock setting */
224 224
225 if (new_line.loopback != 0 && new_line.loopback != 1) 225 if (new_line.loopback != 0 && new_line.loopback != 1)
226 return -EINVAL; 226 return -EINVAL;
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c
index f4125da2762f..3f4e2b5684db 100644
--- a/drivers/net/wan/sdla.c
+++ b/drivers/net/wan/sdla.c
@@ -178,7 +178,7 @@ static char sdla_byte(struct net_device *dev, int addr)
178 byte = *temp; 178 byte = *temp;
179 spin_unlock_irqrestore(&sdla_lock, flags); 179 spin_unlock_irqrestore(&sdla_lock, flags);
180 180
181 return(byte); 181 return byte;
182} 182}
183 183
184static void sdla_stop(struct net_device *dev) 184static void sdla_stop(struct net_device *dev)
@@ -267,7 +267,7 @@ static int sdla_z80_poll(struct net_device *dev, int z80_addr, int jiffs, char r
267 resp = *temp; 267 resp = *temp;
268 } 268 }
269 } 269 }
270 return(time_before(jiffies, done) ? jiffies - start : -1); 270 return time_before(jiffies, done) ? jiffies - start : -1;
271} 271}
272 272
273/* constants for Z80 CPU speed */ 273/* constants for Z80 CPU speed */
@@ -283,13 +283,13 @@ static int sdla_cpuspeed(struct net_device *dev, struct ifreq *ifr)
283 283
284 sdla_start(dev); 284 sdla_start(dev);
285 if (sdla_z80_poll(dev, 0, 3*HZ, Z80_READY, 0) < 0) 285 if (sdla_z80_poll(dev, 0, 3*HZ, Z80_READY, 0) < 0)
286 return(-EIO); 286 return -EIO;
287 287
288 data = LOADER_READY; 288 data = LOADER_READY;
289 sdla_write(dev, 0, &data, 1); 289 sdla_write(dev, 0, &data, 1);
290 290
291 if ((jiffs = sdla_z80_poll(dev, 0, 8*HZ, Z80_SCC_OK, Z80_SCC_BAD)) < 0) 291 if ((jiffs = sdla_z80_poll(dev, 0, 8*HZ, Z80_SCC_OK, Z80_SCC_BAD)) < 0)
292 return(-EIO); 292 return -EIO;
293 293
294 sdla_stop(dev); 294 sdla_stop(dev);
295 sdla_read(dev, 0, &data, 1); 295 sdla_read(dev, 0, &data, 1);
@@ -297,11 +297,11 @@ static int sdla_cpuspeed(struct net_device *dev, struct ifreq *ifr)
297 if (data == Z80_SCC_BAD) 297 if (data == Z80_SCC_BAD)
298 { 298 {
299 printk("%s: SCC bad\n", dev->name); 299 printk("%s: SCC bad\n", dev->name);
300 return(-EIO); 300 return -EIO;
301 } 301 }
302 302
303 if (data != Z80_SCC_OK) 303 if (data != Z80_SCC_OK)
304 return(-EINVAL); 304 return -EINVAL;
305 305
306 if (jiffs < 165) 306 if (jiffs < 165)
307 ifr->ifr_mtu = SDLA_CPU_16M; 307 ifr->ifr_mtu = SDLA_CPU_16M;
@@ -316,7 +316,7 @@ static int sdla_cpuspeed(struct net_device *dev, struct ifreq *ifr)
316 else 316 else
317 ifr->ifr_mtu = SDLA_CPU_3M; 317 ifr->ifr_mtu = SDLA_CPU_3M;
318 318
319 return(0); 319 return 0;
320} 320}
321 321
322/************************************************ 322/************************************************
@@ -493,7 +493,7 @@ static int sdla_cmd(struct net_device *dev, int cmd, short dlci, short flags,
493 if (ret != SDLA_RET_OK) 493 if (ret != SDLA_RET_OK)
494 sdla_errors(dev, cmd, dlci, ret, len, &status); 494 sdla_errors(dev, cmd, dlci, ret, len, &status);
495 495
496 return(ret); 496 return ret;
497} 497}
498 498
499/*********************************************** 499/***********************************************
@@ -516,14 +516,14 @@ static int sdla_activate(struct net_device *slave, struct net_device *master)
516 break; 516 break;
517 517
518 if (i == CONFIG_DLCI_MAX) 518 if (i == CONFIG_DLCI_MAX)
519 return(-ENODEV); 519 return -ENODEV;
520 520
521 flp->dlci[i] = abs(flp->dlci[i]); 521 flp->dlci[i] = abs(flp->dlci[i]);
522 522
523 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE)) 523 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE))
524 sdla_cmd(slave, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL); 524 sdla_cmd(slave, SDLA_ACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL);
525 525
526 return(0); 526 return 0;
527} 527}
528 528
529static int sdla_deactivate(struct net_device *slave, struct net_device *master) 529static int sdla_deactivate(struct net_device *slave, struct net_device *master)
@@ -538,14 +538,14 @@ static int sdla_deactivate(struct net_device *slave, struct net_device *master)
538 break; 538 break;
539 539
540 if (i == CONFIG_DLCI_MAX) 540 if (i == CONFIG_DLCI_MAX)
541 return(-ENODEV); 541 return -ENODEV;
542 542
543 flp->dlci[i] = -abs(flp->dlci[i]); 543 flp->dlci[i] = -abs(flp->dlci[i]);
544 544
545 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE)) 545 if (netif_running(slave) && (flp->config.station == FRAD_STATION_NODE))
546 sdla_cmd(slave, SDLA_DEACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL); 546 sdla_cmd(slave, SDLA_DEACTIVATE_DLCI, 0, 0, &flp->dlci[i], sizeof(short), NULL, NULL);
547 547
548 return(0); 548 return 0;
549} 549}
550 550
551static int sdla_assoc(struct net_device *slave, struct net_device *master) 551static int sdla_assoc(struct net_device *slave, struct net_device *master)
@@ -554,7 +554,7 @@ static int sdla_assoc(struct net_device *slave, struct net_device *master)
554 int i; 554 int i;
555 555
556 if (master->type != ARPHRD_DLCI) 556 if (master->type != ARPHRD_DLCI)
557 return(-EINVAL); 557 return -EINVAL;
558 558
559 flp = netdev_priv(slave); 559 flp = netdev_priv(slave);
560 560
@@ -563,11 +563,11 @@ static int sdla_assoc(struct net_device *slave, struct net_device *master)
563 if (!flp->master[i]) 563 if (!flp->master[i])
564 break; 564 break;
565 if (abs(flp->dlci[i]) == *(short *)(master->dev_addr)) 565 if (abs(flp->dlci[i]) == *(short *)(master->dev_addr))
566 return(-EADDRINUSE); 566 return -EADDRINUSE;
567 } 567 }
568 568
569 if (i == CONFIG_DLCI_MAX) 569 if (i == CONFIG_DLCI_MAX)
570 return(-EMLINK); /* #### Alan: Comments on this ?? */ 570 return -EMLINK; /* #### Alan: Comments on this ?? */
571 571
572 572
573 flp->master[i] = master; 573 flp->master[i] = master;
@@ -581,7 +581,7 @@ static int sdla_assoc(struct net_device *slave, struct net_device *master)
581 sdla_cmd(slave, SDLA_ADD_DLCI, 0, 0, master->dev_addr, sizeof(short), NULL, NULL); 581 sdla_cmd(slave, SDLA_ADD_DLCI, 0, 0, master->dev_addr, sizeof(short), NULL, NULL);
582 } 582 }
583 583
584 return(0); 584 return 0;
585} 585}
586 586
587static int sdla_deassoc(struct net_device *slave, struct net_device *master) 587static int sdla_deassoc(struct net_device *slave, struct net_device *master)
@@ -596,7 +596,7 @@ static int sdla_deassoc(struct net_device *slave, struct net_device *master)
596 break; 596 break;
597 597
598 if (i == CONFIG_DLCI_MAX) 598 if (i == CONFIG_DLCI_MAX)
599 return(-ENODEV); 599 return -ENODEV;
600 600
601 flp->master[i] = NULL; 601 flp->master[i] = NULL;
602 flp->dlci[i] = 0; 602 flp->dlci[i] = 0;
@@ -609,7 +609,7 @@ static int sdla_deassoc(struct net_device *slave, struct net_device *master)
609 sdla_cmd(slave, SDLA_DELETE_DLCI, 0, 0, master->dev_addr, sizeof(short), NULL, NULL); 609 sdla_cmd(slave, SDLA_DELETE_DLCI, 0, 0, master->dev_addr, sizeof(short), NULL, NULL);
610 } 610 }
611 611
612 return(0); 612 return 0;
613} 613}
614 614
615static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, int get) 615static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, int get)
@@ -626,7 +626,7 @@ static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, i
626 break; 626 break;
627 627
628 if (i == CONFIG_DLCI_MAX) 628 if (i == CONFIG_DLCI_MAX)
629 return(-ENODEV); 629 return -ENODEV;
630 630
631 dlp = netdev_priv(master); 631 dlp = netdev_priv(master);
632 632
@@ -641,7 +641,7 @@ static int sdla_dlci_conf(struct net_device *slave, struct net_device *master, i
641 &dlp->config, sizeof(struct dlci_conf) - 4 * sizeof(short), NULL, NULL); 641 &dlp->config, sizeof(struct dlci_conf) - 4 * sizeof(short), NULL, NULL);
642 } 642 }
643 643
644 return(ret == SDLA_RET_OK ? 0 : -EIO); 644 return ret == SDLA_RET_OK ? 0 : -EIO;
645} 645}
646 646
647/************************** 647/**************************
@@ -986,7 +986,7 @@ static int sdla_close(struct net_device *dev)
986 986
987 netif_stop_queue(dev); 987 netif_stop_queue(dev);
988 988
989 return(0); 989 return 0;
990} 990}
991 991
992struct conf_data { 992struct conf_data {
@@ -1006,10 +1006,10 @@ static int sdla_open(struct net_device *dev)
1006 flp = netdev_priv(dev); 1006 flp = netdev_priv(dev);
1007 1007
1008 if (!flp->initialized) 1008 if (!flp->initialized)
1009 return(-EPERM); 1009 return -EPERM;
1010 1010
1011 if (!flp->configured) 1011 if (!flp->configured)
1012 return(-EPERM); 1012 return -EPERM;
1013 1013
1014 /* time to send in the configuration */ 1014 /* time to send in the configuration */
1015 len = 0; 1015 len = 0;
@@ -1087,7 +1087,7 @@ static int sdla_open(struct net_device *dev)
1087 1087
1088 netif_start_queue(dev); 1088 netif_start_queue(dev);
1089 1089
1090 return(0); 1090 return 0;
1091} 1091}
1092 1092
1093static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, int get) 1093static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, int get)
@@ -1098,48 +1098,48 @@ static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, in
1098 short size; 1098 short size;
1099 1099
1100 if (dev->type == 0xFFFF) 1100 if (dev->type == 0xFFFF)
1101 return(-EUNATCH); 1101 return -EUNATCH;
1102 1102
1103 flp = netdev_priv(dev); 1103 flp = netdev_priv(dev);
1104 1104
1105 if (!get) 1105 if (!get)
1106 { 1106 {
1107 if (netif_running(dev)) 1107 if (netif_running(dev))
1108 return(-EBUSY); 1108 return -EBUSY;
1109 1109
1110 if(copy_from_user(&data.config, conf, sizeof(struct frad_conf))) 1110 if(copy_from_user(&data.config, conf, sizeof(struct frad_conf)))
1111 return -EFAULT; 1111 return -EFAULT;
1112 1112
1113 if (data.config.station & ~FRAD_STATION_NODE) 1113 if (data.config.station & ~FRAD_STATION_NODE)
1114 return(-EINVAL); 1114 return -EINVAL;
1115 1115
1116 if (data.config.flags & ~FRAD_VALID_FLAGS) 1116 if (data.config.flags & ~FRAD_VALID_FLAGS)
1117 return(-EINVAL); 1117 return -EINVAL;
1118 1118
1119 if ((data.config.kbaud < 0) || 1119 if ((data.config.kbaud < 0) ||
1120 ((data.config.kbaud > 128) && (flp->type != SDLA_S508))) 1120 ((data.config.kbaud > 128) && (flp->type != SDLA_S508)))
1121 return(-EINVAL); 1121 return -EINVAL;
1122 1122
1123 if (data.config.clocking & ~(FRAD_CLOCK_INT | SDLA_S508_PORT_RS232)) 1123 if (data.config.clocking & ~(FRAD_CLOCK_INT | SDLA_S508_PORT_RS232))
1124 return(-EINVAL); 1124 return -EINVAL;
1125 1125
1126 if ((data.config.mtu < 0) || (data.config.mtu > SDLA_MAX_MTU)) 1126 if ((data.config.mtu < 0) || (data.config.mtu > SDLA_MAX_MTU))
1127 return(-EINVAL); 1127 return -EINVAL;
1128 1128
1129 if ((data.config.T391 < 5) || (data.config.T391 > 30)) 1129 if ((data.config.T391 < 5) || (data.config.T391 > 30))
1130 return(-EINVAL); 1130 return -EINVAL;
1131 1131
1132 if ((data.config.T392 < 5) || (data.config.T392 > 30)) 1132 if ((data.config.T392 < 5) || (data.config.T392 > 30))
1133 return(-EINVAL); 1133 return -EINVAL;
1134 1134
1135 if ((data.config.N391 < 1) || (data.config.N391 > 255)) 1135 if ((data.config.N391 < 1) || (data.config.N391 > 255))
1136 return(-EINVAL); 1136 return -EINVAL;
1137 1137
1138 if ((data.config.N392 < 1) || (data.config.N392 > 10)) 1138 if ((data.config.N392 < 1) || (data.config.N392 > 10))
1139 return(-EINVAL); 1139 return -EINVAL;
1140 1140
1141 if ((data.config.N393 < 1) || (data.config.N393 > 10)) 1141 if ((data.config.N393 < 1) || (data.config.N393 > 10))
1142 return(-EINVAL); 1142 return -EINVAL;
1143 1143
1144 memcpy(&flp->config, &data.config, sizeof(struct frad_conf)); 1144 memcpy(&flp->config, &data.config, sizeof(struct frad_conf));
1145 flp->config.flags |= SDLA_DIRECT_RECV; 1145 flp->config.flags |= SDLA_DIRECT_RECV;
@@ -1171,7 +1171,7 @@ static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, in
1171 { 1171 {
1172 size = sizeof(data); 1172 size = sizeof(data);
1173 if (sdla_cmd(dev, SDLA_READ_DLCI_CONFIGURATION, 0, 0, NULL, 0, &data, &size) != SDLA_RET_OK) 1173 if (sdla_cmd(dev, SDLA_READ_DLCI_CONFIGURATION, 0, 0, NULL, 0, &data, &size) != SDLA_RET_OK)
1174 return(-EIO); 1174 return -EIO;
1175 } 1175 }
1176 else 1176 else
1177 if (flp->configured) 1177 if (flp->configured)
@@ -1185,7 +1185,7 @@ static int sdla_config(struct net_device *dev, struct frad_conf __user *conf, in
1185 return copy_to_user(conf, &data.config, sizeof(struct frad_conf))?-EFAULT:0; 1185 return copy_to_user(conf, &data.config, sizeof(struct frad_conf))?-EFAULT:0;
1186 } 1186 }
1187 1187
1188 return(0); 1188 return 0;
1189} 1189}
1190 1190
1191static int sdla_xfer(struct net_device *dev, struct sdla_mem __user *info, int read) 1191static int sdla_xfer(struct net_device *dev, struct sdla_mem __user *info, int read)
@@ -1200,7 +1200,7 @@ static int sdla_xfer(struct net_device *dev, struct sdla_mem __user *info, int r
1200 { 1200 {
1201 temp = kzalloc(mem.len, GFP_KERNEL); 1201 temp = kzalloc(mem.len, GFP_KERNEL);
1202 if (!temp) 1202 if (!temp)
1203 return(-ENOMEM); 1203 return -ENOMEM;
1204 sdla_read(dev, mem.addr, temp, mem.len); 1204 sdla_read(dev, mem.addr, temp, mem.len);
1205 if(copy_to_user(mem.data, temp, mem.len)) 1205 if(copy_to_user(mem.data, temp, mem.len))
1206 { 1206 {
@@ -1217,7 +1217,7 @@ static int sdla_xfer(struct net_device *dev, struct sdla_mem __user *info, int r
1217 sdla_write(dev, mem.addr, temp, mem.len); 1217 sdla_write(dev, mem.addr, temp, mem.len);
1218 kfree(temp); 1218 kfree(temp);
1219 } 1219 }
1220 return(0); 1220 return 0;
1221} 1221}
1222 1222
1223static int sdla_reconfig(struct net_device *dev) 1223static int sdla_reconfig(struct net_device *dev)
@@ -1241,7 +1241,7 @@ static int sdla_reconfig(struct net_device *dev)
1241 sdla_cmd(dev, SDLA_SET_DLCI_CONFIGURATION, 0, 0, &data, len, NULL, NULL); 1241 sdla_cmd(dev, SDLA_SET_DLCI_CONFIGURATION, 0, 0, &data, len, NULL, NULL);
1242 sdla_cmd(dev, SDLA_ENABLE_COMMUNICATIONS, 0, 0, NULL, 0, NULL, NULL); 1242 sdla_cmd(dev, SDLA_ENABLE_COMMUNICATIONS, 0, 0, NULL, 0, NULL, NULL);
1243 1243
1244 return(0); 1244 return 0;
1245} 1245}
1246 1246
1247static int sdla_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 1247static int sdla_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -1254,20 +1254,20 @@ static int sdla_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1254 flp = netdev_priv(dev); 1254 flp = netdev_priv(dev);
1255 1255
1256 if (!flp->initialized) 1256 if (!flp->initialized)
1257 return(-EINVAL); 1257 return -EINVAL;
1258 1258
1259 switch (cmd) 1259 switch (cmd)
1260 { 1260 {
1261 case FRAD_GET_CONF: 1261 case FRAD_GET_CONF:
1262 case FRAD_SET_CONF: 1262 case FRAD_SET_CONF:
1263 return(sdla_config(dev, ifr->ifr_data, cmd == FRAD_GET_CONF)); 1263 return sdla_config(dev, ifr->ifr_data, cmd == FRAD_GET_CONF);
1264 1264
1265 case SDLA_IDENTIFY: 1265 case SDLA_IDENTIFY:
1266 ifr->ifr_flags = flp->type; 1266 ifr->ifr_flags = flp->type;
1267 break; 1267 break;
1268 1268
1269 case SDLA_CPUSPEED: 1269 case SDLA_CPUSPEED:
1270 return(sdla_cpuspeed(dev, ifr)); 1270 return sdla_cpuspeed(dev, ifr);
1271 1271
1272/* ========================================================== 1272/* ==========================================================
1273NOTE: This is rather a useless action right now, as the 1273NOTE: This is rather a useless action right now, as the
@@ -1277,7 +1277,7 @@ NOTE: This is rather a useless action right now, as the
1277============================================================*/ 1277============================================================*/
1278 case SDLA_PROTOCOL: 1278 case SDLA_PROTOCOL:
1279 if (flp->configured) 1279 if (flp->configured)
1280 return(-EALREADY); 1280 return -EALREADY;
1281 1281
1282 switch (ifr->ifr_flags) 1282 switch (ifr->ifr_flags)
1283 { 1283 {
@@ -1285,7 +1285,7 @@ NOTE: This is rather a useless action right now, as the
1285 dev->type = ifr->ifr_flags; 1285 dev->type = ifr->ifr_flags;
1286 break; 1286 break;
1287 default: 1287 default:
1288 return(-ENOPROTOOPT); 1288 return -ENOPROTOOPT;
1289 } 1289 }
1290 break; 1290 break;
1291 1291
@@ -1297,7 +1297,7 @@ NOTE: This is rather a useless action right now, as the
1297 case SDLA_READMEM: 1297 case SDLA_READMEM:
1298 if(!capable(CAP_SYS_RAWIO)) 1298 if(!capable(CAP_SYS_RAWIO))
1299 return -EPERM; 1299 return -EPERM;
1300 return(sdla_xfer(dev, ifr->ifr_data, cmd == SDLA_READMEM)); 1300 return sdla_xfer(dev, ifr->ifr_data, cmd == SDLA_READMEM);
1301 1301
1302 case SDLA_START: 1302 case SDLA_START:
1303 sdla_start(dev); 1303 sdla_start(dev);
@@ -1308,9 +1308,9 @@ NOTE: This is rather a useless action right now, as the
1308 break; 1308 break;
1309 1309
1310 default: 1310 default:
1311 return(-EOPNOTSUPP); 1311 return -EOPNOTSUPP;
1312 } 1312 }
1313 return(0); 1313 return 0;
1314} 1314}
1315 1315
1316static int sdla_change_mtu(struct net_device *dev, int new_mtu) 1316static int sdla_change_mtu(struct net_device *dev, int new_mtu)
@@ -1320,10 +1320,10 @@ static int sdla_change_mtu(struct net_device *dev, int new_mtu)
1320 flp = netdev_priv(dev); 1320 flp = netdev_priv(dev);
1321 1321
1322 if (netif_running(dev)) 1322 if (netif_running(dev))
1323 return(-EBUSY); 1323 return -EBUSY;
1324 1324
1325 /* for now, you can't change the MTU! */ 1325 /* for now, you can't change the MTU! */
1326 return(-EOPNOTSUPP); 1326 return -EOPNOTSUPP;
1327} 1327}
1328 1328
1329static int sdla_set_config(struct net_device *dev, struct ifmap *map) 1329static int sdla_set_config(struct net_device *dev, struct ifmap *map)
@@ -1337,18 +1337,18 @@ static int sdla_set_config(struct net_device *dev, struct ifmap *map)
1337 flp = netdev_priv(dev); 1337 flp = netdev_priv(dev);
1338 1338
1339 if (flp->initialized) 1339 if (flp->initialized)
1340 return(-EINVAL); 1340 return -EINVAL;
1341 1341
1342 for(i=0; i < ARRAY_SIZE(valid_port); i++) 1342 for(i=0; i < ARRAY_SIZE(valid_port); i++)
1343 if (valid_port[i] == map->base_addr) 1343 if (valid_port[i] == map->base_addr)
1344 break; 1344 break;
1345 1345
1346 if (i == ARRAY_SIZE(valid_port)) 1346 if (i == ARRAY_SIZE(valid_port))
1347 return(-EINVAL); 1347 return -EINVAL;
1348 1348
1349 if (!request_region(map->base_addr, SDLA_IO_EXTENTS, dev->name)){ 1349 if (!request_region(map->base_addr, SDLA_IO_EXTENTS, dev->name)){
1350 printk(KERN_WARNING "SDLA: io-port 0x%04lx in use\n", dev->base_addr); 1350 printk(KERN_WARNING "SDLA: io-port 0x%04lx in use\n", dev->base_addr);
1351 return(-EINVAL); 1351 return -EINVAL;
1352 } 1352 }
1353 base = map->base_addr; 1353 base = map->base_addr;
1354 1354
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index e47f5a986b1c..d81ad8397885 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -648,7 +648,7 @@ static int x25_asy_esc(unsigned char *s, unsigned char *d, int len)
648 } 648 }
649 } 649 }
650 *ptr++ = X25_END; 650 *ptr++ = X25_END;
651 return (ptr - d); 651 return ptr - d;
652} 652}
653 653
654static void x25_asy_unesc(struct x25_asy *sl, unsigned char s) 654static void x25_asy_unesc(struct x25_asy *sl, unsigned char s)
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
index fbf5e843d48c..93956861ea21 100644
--- a/drivers/net/wan/z85230.c
+++ b/drivers/net/wan/z85230.c
@@ -766,7 +766,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id)
766 766
767EXPORT_SYMBOL(z8530_interrupt); 767EXPORT_SYMBOL(z8530_interrupt);
768 768
769static char reg_init[16]= 769static const u8 reg_init[16]=
770{ 770{
771 0,0,0,0, 771 0,0,0,0,
772 0,0,0,0, 772 0,0,0,0,
@@ -1206,7 +1206,7 @@ EXPORT_SYMBOL(z8530_sync_txdma_close);
1206 * it exists... 1206 * it exists...
1207 */ 1207 */
1208 1208
1209static char *z8530_type_name[]={ 1209static const char *z8530_type_name[]={
1210 "Z8530", 1210 "Z8530",
1211 "Z85C30", 1211 "Z85C30",
1212 "Z85230" 1212 "Z85230"