Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: dgnc: fix checkpatch.pl usage of volatile.

This is a patch to the dgnc_cls.c file that fixes up volatile usage
warning found by the checkpatch.pl tool

Signed-off-by: S. Stalin Srinivasan <stalinsrinivasan.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

stalinsrinivasan.s and committed by
Greg Kroah-Hartman
9979ef7d cb3714a6

+6 -1
+6 -1
drivers/staging/dgnc/dgnc_cls.c
··· 1151 1151 1152 1152 static void cls_parse_modem(struct channel_t *ch, uchar signals) 1153 1153 { 1154 - volatile uchar msignals = signals; 1154 + uchar msignals = signals; 1155 + ulong lock_flags; 1155 1156 1156 1157 if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) 1157 1158 return; ··· 1164 1163 * Do altpin switching. Altpin switches DCD and DSR. 1165 1164 * This prolly breaks DSRPACE, so we should be more clever here. 1166 1165 */ 1166 + DGNC_LOCK(ch->ch_lock, lock_flags); 1167 1167 if (ch->ch_digi.digi_flags & DIGI_ALTPIN) { 1168 1168 uchar mswap = signals; 1169 1169 if (mswap & UART_MSR_DDCD) { ··· 1184 1182 msignals |= UART_MSR_DCD; 1185 1183 } 1186 1184 } 1185 + DGNC_UNLOCK(ch->ch_lock, lock_flags); 1187 1186 1188 1187 /* 1189 1188 * Scrub off lower bits. They signify delta's, which I don't ··· 1192 1189 */ 1193 1190 signals &= 0xf0; 1194 1191 1192 + DGNC_LOCK(ch->ch_lock, lock_flags); 1195 1193 if (msignals & UART_MSR_DCD) 1196 1194 ch->ch_mistat |= UART_MSR_DCD; 1197 1195 else ··· 1212 1208 ch->ch_mistat |= UART_MSR_CTS; 1213 1209 else 1214 1210 ch->ch_mistat &= ~UART_MSR_CTS; 1211 + DGNC_UNLOCK(ch->ch_lock, lock_flags); 1215 1212 1216 1213 1217 1214 DPR_MSIGS((