diff options
author | Craig Shelley <craig@microtron.org.uk> | 2009-02-26 17:21:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:20:44 -0400 |
commit | 97324955c62aaa104edea2ef4370dc8882a5ab82 (patch) | |
tree | e4eeac6cb95af352db1118c9050886406fcbe01c /drivers/usb | |
parent | ef8b6bcb39559d956f897acf7ebe600d5105d479 (diff) |
USB: CP2101 Reduce Error Logging
This patch lowers the logging priority of certain messages to prevent
users from flooding the log files.
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/cp2101.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c index 9b56e35aee4d..2f23d0643624 100644 --- a/drivers/usb/serial/cp2101.c +++ b/drivers/usb/serial/cp2101.c | |||
@@ -11,10 +11,6 @@ | |||
11 | * thanks to Karl Hiramoto karl@hiramoto.org. RTSCTS hardware flow | 11 | * thanks to Karl Hiramoto karl@hiramoto.org. RTSCTS hardware flow |
12 | * control thanks to Munir Nassar nassarmu@real-time.com | 12 | * control thanks to Munir Nassar nassarmu@real-time.com |
13 | * | 13 | * |
14 | * Outstanding Issues: | ||
15 | * Buffers are not flushed when the port is opened. | ||
16 | * Multiple calls to write() may fail with "Resource temporarily unavailable" | ||
17 | * | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
@@ -225,7 +221,7 @@ static int cp2101_get_config(struct usb_serial_port *port, u8 request, | |||
225 | kfree(buf); | 221 | kfree(buf); |
226 | 222 | ||
227 | if (result != size) { | 223 | if (result != size) { |
228 | dev_err(&port->dev, "%s - Unable to send config request, " | 224 | dbg("%s - Unable to send config request, " |
229 | "request=0x%x size=%d result=%d\n", | 225 | "request=0x%x size=%d result=%d\n", |
230 | __func__, request, size, result); | 226 | __func__, request, size, result); |
231 | return -EPROTO; | 227 | return -EPROTO; |
@@ -276,7 +272,7 @@ static int cp2101_set_config(struct usb_serial_port *port, u8 request, | |||
276 | kfree(buf); | 272 | kfree(buf); |
277 | 273 | ||
278 | if ((size > 2 && result != size) || result < 0) { | 274 | if ((size > 2 && result != size) || result < 0) { |
279 | dev_err(&port->dev, "%s - Unable to send request, " | 275 | dbg("%s - Unable to send request, " |
280 | "request=0x%x size=%d result=%d\n", | 276 | "request=0x%x size=%d result=%d\n", |
281 | __func__, request, size, result); | 277 | __func__, request, size, result); |
282 | return -EPROTO; | 278 | return -EPROTO; |
@@ -566,8 +562,7 @@ static void cp2101_set_termios(struct tty_struct *tty, | |||
566 | baud); | 562 | baud); |
567 | if (cp2101_set_config_single(port, CP2101_BAUDRATE, | 563 | if (cp2101_set_config_single(port, CP2101_BAUDRATE, |
568 | ((BAUD_RATE_GEN_FREQ + baud/2) / baud))) { | 564 | ((BAUD_RATE_GEN_FREQ + baud/2) / baud))) { |
569 | dev_err(&port->dev, "Baud rate requested not " | 565 | dbg("Baud rate requested not supported by device\n"); |
570 | "supported by device\n"); | ||
571 | baud = tty_termios_baud_rate(old_termios); | 566 | baud = tty_termios_baud_rate(old_termios); |
572 | } | 567 | } |
573 | } | 568 | } |
@@ -600,14 +595,14 @@ static void cp2101_set_termios(struct tty_struct *tty, | |||
600 | dbg("%s - data bits = 9", __func__); | 595 | dbg("%s - data bits = 9", __func__); |
601 | break;*/ | 596 | break;*/ |
602 | default: | 597 | default: |
603 | dev_err(&port->dev, "cp2101 driver does not " | 598 | dbg("cp2101 driver does not " |
604 | "support the number of bits requested," | 599 | "support the number of bits requested," |
605 | " using 8 bit mode\n"); | 600 | " using 8 bit mode\n"); |
606 | bits |= BITS_DATA_8; | 601 | bits |= BITS_DATA_8; |
607 | break; | 602 | break; |
608 | } | 603 | } |
609 | if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) | 604 | if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) |
610 | dev_err(&port->dev, "Number of data bits requested " | 605 | dbg("Number of data bits requested " |
611 | "not supported by device\n"); | 606 | "not supported by device\n"); |
612 | } | 607 | } |
613 | 608 | ||
@@ -624,7 +619,7 @@ static void cp2101_set_termios(struct tty_struct *tty, | |||
624 | } | 619 | } |
625 | } | 620 | } |
626 | if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) | 621 | if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) |
627 | dev_err(&port->dev, "Parity mode not supported " | 622 | dbg("Parity mode not supported " |
628 | "by device\n"); | 623 | "by device\n"); |
629 | } | 624 | } |
630 | 625 | ||
@@ -639,7 +634,7 @@ static void cp2101_set_termios(struct tty_struct *tty, | |||
639 | dbg("%s - stop bits = 1", __func__); | 634 | dbg("%s - stop bits = 1", __func__); |
640 | } | 635 | } |
641 | if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) | 636 | if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) |
642 | dev_err(&port->dev, "Number of stop bits requested " | 637 | dbg("Number of stop bits requested " |
643 | "not supported by device\n"); | 638 | "not supported by device\n"); |
644 | } | 639 | } |
645 | 640 | ||