diff options
author | Alexandru Juncu <alexj@rosedu.org> | 2013-07-19 04:24:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-26 20:59:07 -0400 |
commit | ecda040ff3724f021a96491ecee88d48e968c153 (patch) | |
tree | b1d399a80c0cb9366d393cd89c9827aac71085be /drivers/char | |
parent | 26dac3c49d56642b06c07c80a2184abbf510920f (diff) |
pcmcia: synclink_cs: replace sum of bitmasks with OR operation.
Suggested by coccinelle and manually verified.
Signed-off-by: Alexandru Juncu <alexj@rosedu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 5c5cc00ebb07..d39cca659a3f 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -1182,14 +1182,14 @@ static irqreturn_t mgslpc_isr(int dummy, void *dev_id) | |||
1182 | } | 1182 | } |
1183 | count++; | 1183 | count++; |
1184 | 1184 | ||
1185 | if (gis & (BIT1 + BIT0)) { | 1185 | if (gis & (BIT1 | BIT0)) { |
1186 | isr = read_reg16(info, CHB + ISR); | 1186 | isr = read_reg16(info, CHB + ISR); |
1187 | if (isr & IRQ_DCD) | 1187 | if (isr & IRQ_DCD) |
1188 | dcd_change(info, tty); | 1188 | dcd_change(info, tty); |
1189 | if (isr & IRQ_CTS) | 1189 | if (isr & IRQ_CTS) |
1190 | cts_change(info, tty); | 1190 | cts_change(info, tty); |
1191 | } | 1191 | } |
1192 | if (gis & (BIT3 + BIT2)) | 1192 | if (gis & (BIT3 | BIT2)) |
1193 | { | 1193 | { |
1194 | isr = read_reg16(info, CHA + ISR); | 1194 | isr = read_reg16(info, CHA + ISR); |
1195 | if (isr & IRQ_TIMER) { | 1195 | if (isr & IRQ_TIMER) { |
@@ -1210,7 +1210,7 @@ static irqreturn_t mgslpc_isr(int dummy, void *dev_id) | |||
1210 | if (isr & IRQ_RXTIME) { | 1210 | if (isr & IRQ_RXTIME) { |
1211 | issue_command(info, CHA, CMD_RXFIFO_READ); | 1211 | issue_command(info, CHA, CMD_RXFIFO_READ); |
1212 | } | 1212 | } |
1213 | if (isr & (IRQ_RXEOM + IRQ_RXFIFO)) { | 1213 | if (isr & (IRQ_RXEOM | IRQ_RXFIFO)) { |
1214 | if (info->params.mode == MGSL_MODE_HDLC) | 1214 | if (info->params.mode == MGSL_MODE_HDLC) |
1215 | rx_ready_hdlc(info, isr & IRQ_RXEOM); | 1215 | rx_ready_hdlc(info, isr & IRQ_RXEOM); |
1216 | else | 1216 | else |
@@ -3031,11 +3031,11 @@ static void loopback_enable(MGSLPC_INFO *info) | |||
3031 | unsigned char val; | 3031 | unsigned char val; |
3032 | 3032 | ||
3033 | /* CCR1:02..00 CM[2..0] Clock Mode = 111 (clock mode 7) */ | 3033 | /* CCR1:02..00 CM[2..0] Clock Mode = 111 (clock mode 7) */ |
3034 | val = read_reg(info, CHA + CCR1) | (BIT2 + BIT1 + BIT0); | 3034 | val = read_reg(info, CHA + CCR1) | (BIT2 | BIT1 | BIT0); |
3035 | write_reg(info, CHA + CCR1, val); | 3035 | write_reg(info, CHA + CCR1, val); |
3036 | 3036 | ||
3037 | /* CCR2:04 SSEL Clock source select, 1=submode b */ | 3037 | /* CCR2:04 SSEL Clock source select, 1=submode b */ |
3038 | val = read_reg(info, CHA + CCR2) | (BIT4 + BIT5); | 3038 | val = read_reg(info, CHA + CCR2) | (BIT4 | BIT5); |
3039 | write_reg(info, CHA + CCR2, val); | 3039 | write_reg(info, CHA + CCR2, val); |
3040 | 3040 | ||
3041 | /* set LinkSpeed if available, otherwise default to 2Mbps */ | 3041 | /* set LinkSpeed if available, otherwise default to 2Mbps */ |
@@ -3125,10 +3125,10 @@ static void hdlc_mode(MGSLPC_INFO *info) | |||
3125 | val |= BIT4; | 3125 | val |= BIT4; |
3126 | break; // FM0 | 3126 | break; // FM0 |
3127 | case HDLC_ENCODING_BIPHASE_MARK: | 3127 | case HDLC_ENCODING_BIPHASE_MARK: |
3128 | val |= BIT4 + BIT2; | 3128 | val |= BIT4 | BIT2; |
3129 | break; // FM1 | 3129 | break; // FM1 |
3130 | case HDLC_ENCODING_BIPHASE_LEVEL: | 3130 | case HDLC_ENCODING_BIPHASE_LEVEL: |
3131 | val |= BIT4 + BIT3; | 3131 | val |= BIT4 | BIT3; |
3132 | break; // Manchester | 3132 | break; // Manchester |
3133 | } | 3133 | } |
3134 | write_reg(info, CHA + CCR0, val); | 3134 | write_reg(info, CHA + CCR0, val); |
@@ -3185,7 +3185,7 @@ static void hdlc_mode(MGSLPC_INFO *info) | |||
3185 | */ | 3185 | */ |
3186 | val = 0x00; | 3186 | val = 0x00; |
3187 | if (info->params.crc_type == HDLC_CRC_NONE) | 3187 | if (info->params.crc_type == HDLC_CRC_NONE) |
3188 | val |= BIT2 + BIT1; | 3188 | val |= BIT2 | BIT1; |
3189 | if (info->params.preamble != HDLC_PREAMBLE_PATTERN_NONE) | 3189 | if (info->params.preamble != HDLC_PREAMBLE_PATTERN_NONE) |
3190 | val |= BIT5; | 3190 | val |= BIT5; |
3191 | switch (info->params.preamble_length) | 3191 | switch (info->params.preamble_length) |
@@ -3197,7 +3197,7 @@ static void hdlc_mode(MGSLPC_INFO *info) | |||
3197 | val |= BIT6; | 3197 | val |= BIT6; |
3198 | break; | 3198 | break; |
3199 | case HDLC_PREAMBLE_LENGTH_64BITS: | 3199 | case HDLC_PREAMBLE_LENGTH_64BITS: |
3200 | val |= BIT7 + BIT6; | 3200 | val |= BIT7 | BIT6; |
3201 | break; | 3201 | break; |
3202 | } | 3202 | } |
3203 | write_reg(info, CHA + CCR3, val); | 3203 | write_reg(info, CHA + CCR3, val); |
@@ -3264,8 +3264,8 @@ static void hdlc_mode(MGSLPC_INFO *info) | |||
3264 | clear_reg_bits(info, CHA + PVR, BIT3); | 3264 | clear_reg_bits(info, CHA + PVR, BIT3); |
3265 | 3265 | ||
3266 | irq_enable(info, CHA, | 3266 | irq_enable(info, CHA, |
3267 | IRQ_RXEOM + IRQ_RXFIFO + IRQ_ALLSENT + | 3267 | IRQ_RXEOM | IRQ_RXFIFO | IRQ_ALLSENT | |
3268 | IRQ_UNDERRUN + IRQ_TXFIFO); | 3268 | IRQ_UNDERRUN | IRQ_TXFIFO); |
3269 | issue_command(info, CHA, CMD_TXRESET + CMD_RXRESET); | 3269 | issue_command(info, CHA, CMD_TXRESET + CMD_RXRESET); |
3270 | wait_command_complete(info, CHA); | 3270 | wait_command_complete(info, CHA); |
3271 | read_reg16(info, CHA + ISR); /* clear pending IRQs */ | 3271 | read_reg16(info, CHA + ISR); /* clear pending IRQs */ |
@@ -3582,8 +3582,8 @@ static void async_mode(MGSLPC_INFO *info) | |||
3582 | } else | 3582 | } else |
3583 | clear_reg_bits(info, CHA + PVR, BIT3); | 3583 | clear_reg_bits(info, CHA + PVR, BIT3); |
3584 | irq_enable(info, CHA, | 3584 | irq_enable(info, CHA, |
3585 | IRQ_RXEOM + IRQ_RXFIFO + IRQ_BREAK_ON + IRQ_RXTIME + | 3585 | IRQ_RXEOM | IRQ_RXFIFO | IRQ_BREAK_ON | IRQ_RXTIME | |
3586 | IRQ_ALLSENT + IRQ_TXFIFO); | 3586 | IRQ_ALLSENT | IRQ_TXFIFO); |
3587 | issue_command(info, CHA, CMD_TXRESET + CMD_RXRESET); | 3587 | issue_command(info, CHA, CMD_TXRESET + CMD_RXRESET); |
3588 | wait_command_complete(info, CHA); | 3588 | wait_command_complete(info, CHA); |
3589 | read_reg16(info, CHA + ISR); /* clear pending IRQs */ | 3589 | read_reg16(info, CHA + ISR); /* clear pending IRQs */ |