o wan/cycx: further cleanups

. remove whitespaces
. use tabs instead of sequences of 8 spaces
. remove the wrappers for write{b,w} & friends
. align case entries with corresponding switch statement
parent 706245bb
This diff is collapsed.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br> * Author: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
* *
* Copyright: (c) 1998-2001 Arnaldo Carvalho de Melo * Copyright: (c) 1998-2003 Arnaldo Carvalho de Melo
* *
* Based on sdlamain.c by Gene Kozin <genek@compuserve.com> & * Based on sdlamain.c by Gene Kozin <genek@compuserve.com> &
* Jaspreet Singh <jaspreet@sangoma.com> * Jaspreet Singh <jaspreet@sangoma.com>
...@@ -75,7 +75,7 @@ static int shutdown(struct wan_device *wandev); ...@@ -75,7 +75,7 @@ static int shutdown(struct wan_device *wandev);
static int ioctl(struct wan_device *wandev, unsigned cmd, unsigned long arg); static int ioctl(struct wan_device *wandev, unsigned cmd, unsigned long arg);
/* Miscellaneous functions */ /* Miscellaneous functions */
static irqreturn_t cycx_isr (int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t cycx_isr(int irq, void *dev_id, struct pt_regs *regs);
/* Global Data /* Global Data
* Note: All data must be explicitly initialized!!! * Note: All data must be explicitly initialized!!!
...@@ -103,7 +103,7 @@ static struct cycx_device *card_array; /* adapter data space */ ...@@ -103,7 +103,7 @@ static struct cycx_device *card_array; /* adapter data space */
* < 0 error. * < 0 error.
* Context: process * Context: process
*/ */
int __init cyclomx_init (void) int __init cyclomx_init(void)
{ {
int cnt, err = -ENOMEM; int cnt, err = -ENOMEM;
...@@ -156,7 +156,7 @@ out: return err; ...@@ -156,7 +156,7 @@ out: return err;
* o unregister all adapters from the WAN router * o unregister all adapters from the WAN router
* o release all remaining system resources * o release all remaining system resources
*/ */
static void __exit cyclomx_cleanup (void) static void __exit cyclomx_cleanup(void)
{ {
int i = 0; int i = 0;
...@@ -188,7 +188,7 @@ static int setup(struct wan_device *wandev, wandev_conf_t *conf) ...@@ -188,7 +188,7 @@ static int setup(struct wan_device *wandev, wandev_conf_t *conf)
int irq; int irq;
/* Sanity checks */ /* Sanity checks */
if (!wandev || !wandev->private || !conf) if (!wandev || !wandev->private || !conf)
goto out; goto out;
...@@ -243,14 +243,14 @@ static int setup(struct wan_device *wandev, wandev_conf_t *conf) ...@@ -243,14 +243,14 @@ static int setup(struct wan_device *wandev, wandev_conf_t *conf)
/* Protocol-specific initialization */ /* Protocol-specific initialization */
switch (card->hw.fwid) { switch (card->hw.fwid) {
#ifdef CONFIG_CYCLOMX_X25 #ifdef CONFIG_CYCLOMX_X25
case CFID_X25_2X: case CFID_X25_2X:
err = cyx_init(card, conf); err = cyx_init(card, conf);
break; break;
#endif #endif
default: default:
printk(KERN_ERR "%s: this firmware is not supported!\n", printk(KERN_ERR "%s: this firmware is not supported!\n",
wandev->name); wandev->name);
err = -EINVAL; err = -EINVAL;
} }
if (err) { if (err) {
...@@ -266,7 +266,7 @@ out: return err; ...@@ -266,7 +266,7 @@ out: return err;
} }
/* /*
* Shut down WAN link driver. * Shut down WAN link driver.
* o shut down adapter hardware * o shut down adapter hardware
* o release system resources. * o release system resources.
* *
...@@ -296,7 +296,7 @@ out: return ret; ...@@ -296,7 +296,7 @@ out: return ret;
} }
/* /*
* Driver I/O control. * Driver I/O control.
* o verify arguments * o verify arguments
* o perform requested action * o perform requested action
* *
...@@ -316,7 +316,7 @@ static int ioctl(struct wan_device *wandev, unsigned cmd, unsigned long arg) ...@@ -316,7 +316,7 @@ static int ioctl(struct wan_device *wandev, unsigned cmd, unsigned long arg)
* o acknowledge Cyclom 2X hardware interrupt. * o acknowledge Cyclom 2X hardware interrupt.
* o call protocol-specific interrupt service routine, if any. * o call protocol-specific interrupt service routine, if any.
*/ */
static irqreturn_t cycx_isr (int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t cycx_isr(int irq, void *dev_id, struct pt_regs *regs)
{ {
struct cycx_device *card = (struct cycx_device *)dev_id; struct cycx_device *card = (struct cycx_device *)dev_id;
...@@ -345,15 +345,13 @@ void cyclomx_set_state(struct cycx_device *card, int state) ...@@ -345,15 +345,13 @@ void cyclomx_set_state(struct cycx_device *card, int state)
if (card->wandev.state != state) { if (card->wandev.state != state) {
switch (state) { switch (state) {
case WAN_CONNECTED: case WAN_CONNECTED:
string_state = "connected!"; string_state = "connected!";
break; break;
case WAN_DISCONNECTED:
case WAN_DISCONNECTED: string_state = "disconnected!";
string_state = "disconnected!"; break;
break;
} }
printk(KERN_INFO "%s: link %s\n", card->devname, string_state); printk(KERN_INFO "%s: link %s\n", card->devname, string_state);
card->wandev.state = state; card->wandev.state = state;
} }
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment