| .. | .. |
|---|
| 1230 | 1230 | */ |
|---|
| 1231 | 1231 | int pdc_iodc_print(const unsigned char *str, unsigned count) |
|---|
| 1232 | 1232 | { |
|---|
| 1233 | | - unsigned int i; |
|---|
| 1233 | + unsigned int i, found = 0; |
|---|
| 1234 | 1234 | unsigned long flags; |
|---|
| 1235 | 1235 | |
|---|
| 1236 | 1236 | for (i = 0; i < count;) { |
|---|
| .. | .. |
|---|
| 1239 | 1239 | iodc_dbuf[i+0] = '\r'; |
|---|
| 1240 | 1240 | iodc_dbuf[i+1] = '\n'; |
|---|
| 1241 | 1241 | i += 2; |
|---|
| 1242 | + found = 1; |
|---|
| 1242 | 1243 | goto print; |
|---|
| 1243 | 1244 | default: |
|---|
| 1244 | 1245 | iodc_dbuf[i] = str[i]; |
|---|
| .. | .. |
|---|
| 1255 | 1256 | __pa(iodc_retbuf), 0, __pa(iodc_dbuf), i, 0); |
|---|
| 1256 | 1257 | spin_unlock_irqrestore(&pdc_lock, flags); |
|---|
| 1257 | 1258 | |
|---|
| 1258 | | - return i; |
|---|
| 1259 | + return i - found; |
|---|
| 1259 | 1260 | } |
|---|
| 1260 | 1261 | |
|---|
| 1261 | 1262 | #if !defined(BOOTLOADER) |
|---|