Skip to content

Commit

Permalink
isdn/capi: fix readability damage
Browse files Browse the repository at this point in the history
Fix up some of the readibility deterioration caused by the recent
whitespace coding style cleanup.

Signed-off-by: Tilman Schmidt <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tilmanschmidt authored and davem330 committed May 8, 2012
1 parent 81fa7b8 commit 7fdaadc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
23 changes: 7 additions & 16 deletions drivers/isdn/capi/capi.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return retval;

case CAPI_GET_VERSION:
{
if (copy_from_user(&data.contr, argp,
sizeof(data.contr)))
return -EFAULT;
Expand All @@ -796,11 +795,9 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (copy_to_user(argp, &data.version,
sizeof(data.version)))
return -EFAULT;
}
return 0;
return 0;

case CAPI_GET_SERIAL:
{
if (copy_from_user(&data.contr, argp,
sizeof(data.contr)))
return -EFAULT;
Expand All @@ -810,10 +807,9 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (copy_to_user(argp, data.serial,
sizeof(data.serial)))
return -EFAULT;
}
return 0;
return 0;

case CAPI_GET_PROFILE:
{
if (copy_from_user(&data.contr, argp,
sizeof(data.contr)))
return -EFAULT;
Expand All @@ -837,11 +833,9 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
if (retval)
return -EFAULT;
}
return 0;
return 0;

case CAPI_GET_MANUFACTURER:
{
if (copy_from_user(&data.contr, argp,
sizeof(data.contr)))
return -EFAULT;
Expand All @@ -853,8 +847,8 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
sizeof(data.manufacturer)))
return -EFAULT;

}
return 0;
return 0;

case CAPI_GET_ERRCODE:
data.errcode = cdev->errcode;
cdev->errcode = CAPI_NOERROR;
Expand All @@ -870,17 +864,14 @@ capi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return 0;
return -ENXIO;

case CAPI_MANUFACTURER_CMD:
{
case CAPI_MANUFACTURER_CMD: {
struct capi_manufacturer_cmd mcmd;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (copy_from_user(&mcmd, argp, sizeof(mcmd)))
return -EFAULT;
return capi20_manufacturer(mcmd.cmd, mcmd.data);
}
return 0;

case CAPI_SET_FLAGS:
case CAPI_CLR_FLAGS: {
unsigned userflags;
Expand Down
8 changes: 5 additions & 3 deletions drivers/isdn/capi/capidrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ static int capidrv_command(isdn_ctrl *c, capidrv_contr *card)
return capidrv_ioctl(c, card);

switch (c->command) {
case ISDN_CMD_DIAL:{
case ISDN_CMD_DIAL: {
u8 calling[ISDN_MSNLEN + 3];
u8 called[ISDN_MSNLEN + 2];

Expand Down Expand Up @@ -2072,15 +2072,17 @@ static int capidrv_addcontr(u16 contr, struct capi_profile *profp)
card->interface.writebuf_skb = if_sendbuf;
card->interface.writecmd = NULL;
card->interface.readstat = if_readstat;
card->interface.features = ISDN_FEATURE_L2_HDLC |
card->interface.features =
ISDN_FEATURE_L2_HDLC |
ISDN_FEATURE_L2_TRANS |
ISDN_FEATURE_L3_TRANS |
ISDN_FEATURE_P_UNKNOWN |
ISDN_FEATURE_L2_X75I |
ISDN_FEATURE_L2_X75UI |
ISDN_FEATURE_L2_X75BUI;
if (profp->support1 & (1 << 2))
card->interface.features |= ISDN_FEATURE_L2_V11096 |
card->interface.features |=
ISDN_FEATURE_L2_V11096 |
ISDN_FEATURE_L2_V11019 |
ISDN_FEATURE_L2_V11038;
if (profp->support1 & (1 << 8))
Expand Down

0 comments on commit 7fdaadc

Please sign in to comment.