Commit 03f18285 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by David S. Miller

isdn/divert: fix readability damage

Fix up some of the readibility deterioration caused by last year's
ISDN whitespace coding style cleanup.
Note that the checkpatch complaints all apply to the state of the
source before this patch as well, and in many cases even more so.
Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56567c6f
......@@ -22,13 +22,13 @@ MODULE_LICENSE("GPL");
/****************************************/
/* structure containing interface to hl */
/****************************************/
isdn_divert_if divert_if =
{ DIVERT_IF_MAGIC, /* magic value */
DIVERT_CMD_REG, /* register cmd */
ll_callback, /* callback routine from ll */
NULL, /* command still not specified */
NULL, /* drv_to_name */
NULL, /* name_to_drv */
isdn_divert_if divert_if = {
DIVERT_IF_MAGIC, /* magic value */
DIVERT_CMD_REG, /* register cmd */
ll_callback, /* callback routine from ll */
NULL, /* command still not specified */
NULL, /* drv_to_name */
NULL, /* name_to_drv */
};
/*************************/
......@@ -36,14 +36,15 @@ isdn_divert_if divert_if =
/* no cmd line parms */
/*************************/
static int __init divert_init(void)
{ int i;
{
int i;
if (divert_dev_init())
{ printk(KERN_WARNING "dss1_divert: cannot install device, not loaded\n");
if (divert_dev_init()) {
printk(KERN_WARNING "dss1_divert: cannot install device, not loaded\n");
return (-EIO);
}
if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR)
{ divert_dev_deinit();
if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) {
divert_dev_deinit();
printk(KERN_WARNING "dss1_divert: error %d registering module, not loaded\n", i);
return (-EIO);
}
......@@ -61,13 +62,13 @@ static void __exit divert_exit(void)
spin_lock_irqsave(&divert_lock, flags);
divert_if.cmd = DIVERT_CMD_REL; /* release */
if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR)
{ printk(KERN_WARNING "dss1_divert: error %d releasing module\n", i);
if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) {
printk(KERN_WARNING "dss1_divert: error %d releasing module\n", i);
spin_unlock_irqrestore(&divert_lock, flags);
return;
}
if (divert_dev_deinit())
{ printk(KERN_WARNING "dss1_divert: device busy, remove cancelled\n");
if (divert_dev_deinit()) {
printk(KERN_WARNING "dss1_divert: device busy, remove cancelled\n");
spin_unlock_irqrestore(&divert_lock, flags);
return;
}
......
This diff is collapsed.
......@@ -43,8 +43,8 @@
#define DEFLECT_ALL_IDS 0xFFFFFFFF /* all drivers selected */
typedef struct
{ ulong drvid; /* driver ids, bit mapped */
typedef struct {
ulong drvid; /* driver ids, bit mapped */
char my_msn[35]; /* desired msn, subaddr allowed */
char caller[35]; /* caller id, partial string with * + subaddr allowed */
char to_nr[35]; /* deflected to number incl. subaddress */
......@@ -65,18 +65,18 @@ typedef struct
u_char waittime; /* maximum wait time for proceeding */
} divert_rule;
typedef union
{ int drv_version; /* return of driver version */
struct
{ int drvid; /* id of driver */
typedef union {
int drv_version; /* return of driver version */
struct {
int drvid; /* id of driver */
char drvnam[30]; /* name of driver */
} getid;
struct
{ int ruleidx; /* index of rule */
struct {
int ruleidx; /* index of rule */
divert_rule rule; /* rule parms */
} getsetrule;
struct
{ u_char subcmd; /* 0 = hangup/reject,
struct {
u_char subcmd; /* 0 = hangup/reject,
1 = alert,
2 = deflect */
ulong callid; /* id of call delivered by ascii output */
......@@ -84,8 +84,8 @@ typedef union
else uus1 string (maxlen 31),
data from rule used if empty */
} fwd_ctrl;
struct
{ int drvid; /* id of driver */
struct {
int drvid; /* id of driver */
u_char cfproc; /* cfu = 0, cfb = 1, cfnr = 2 */
ulong procid; /* process id returned when no error */
u_char service; /* basically coded service, 0 = all */
......@@ -104,8 +104,8 @@ typedef union
/**************************************************/
/* structure keeping ascii info for device output */
/**************************************************/
struct divert_info
{ struct divert_info *next;
struct divert_info {
struct divert_info *next;
ulong usage_cnt; /* number of files still to work */
char info_start[2]; /* info string start */
};
......
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