]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/gadget/u_serial.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
[~andy/linux] / drivers / usb / gadget / u_serial.c
index 3a4a664bab44c44583ce696e8918146d504e5ae2..6c23938d2711aee943637b1d20db1cd385d05d41 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
 #include <linux/slab.h>
+#include <linux/export.h>
 
 #include "u_serial.h"
 
@@ -724,9 +725,6 @@ static int gs_open(struct tty_struct *tty, struct file *file)
        struct gs_port  *port;
        int             status;
 
-       if (port_num < 0 || port_num >= n_ports)
-               return -ENXIO;
-
        do {
                mutex_lock(&ports[port_num].lock);
                port = ports[port_num].port;
@@ -1086,7 +1084,6 @@ int __init gserial_setup(struct usb_gadget *g, unsigned count)
        if (!gs_tty_driver)
                return -ENOMEM;
 
-       gs_tty_driver->owner = THIS_MODULE;
        gs_tty_driver->driver_name = "g_serial";
        gs_tty_driver->name = PREFIX;
        /* uses dynamically assigned dev_t values */