summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/usb_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/serial/usb_serial.c')
-rw-r--r--sys/dev/usb/serial/usb_serial.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/usb/serial/usb_serial.c b/sys/dev/usb/serial/usb_serial.c
index 08ce2ca..a2c1f97 100644
--- a/sys/dev/usb/serial/usb_serial.c
+++ b/sys/dev/usb/serial/usb_serial.c
@@ -236,14 +236,14 @@ ucom_unit_free(int unit)
*/
int
ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc,
- uint32_t subunits, void *parent,
+ int subunits, void *parent,
const struct ucom_callback *callback, struct mtx *mtx)
{
- uint32_t subunit;
+ int subunit;
int error = 0;
if ((sc == NULL) ||
- (subunits == 0) ||
+ (subunits <= 0) ||
(callback == NULL)) {
return (EINVAL);
}
@@ -293,7 +293,7 @@ ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc,
void
ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc)
{
- uint32_t subunit;
+ int subunit;
if (ssc->sc_subunits == 0)
return; /* not initialized */
@@ -1089,11 +1089,6 @@ ucom_param(struct tty *tp, struct termios *t)
DPRINTF("sc = %p\n", sc);
/* Check requested parameters. */
- if (t->c_ospeed < 0) {
- DPRINTF("negative ospeed\n");
- error = EINVAL;
- goto done;
- }
if (t->c_ispeed && (t->c_ispeed != t->c_ospeed)) {
DPRINTF("mismatch ispeed and ospeed\n");
error = EINVAL;
OpenPOWER on IntegriCloud