Commit 3033bc8d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: Serial: usb-serial: remove debug module parameter

Now that all usb-serial modules are only using dev_dbg()
the debug module parameter does not do anything at all, so
remove it to reduce any confusion if someone were to try
to use it.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d3d6c328
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/usb/serial.h> #include <linux/usb/serial.h>
static int debug;
struct usbcons_info { struct usbcons_info {
int magic; int magic;
int break_flag; int break_flag;
...@@ -283,10 +281,8 @@ void usb_serial_console_disconnect(struct usb_serial *serial) ...@@ -283,10 +281,8 @@ void usb_serial_console_disconnect(struct usb_serial *serial)
} }
} }
void usb_serial_console_init(int serial_debug, int minor) void usb_serial_console_init(int minor)
{ {
debug = serial_debug;
if (minor == 0) { if (minor == 0) {
/* /*
* Call register_console() if this is the first device plugged * Call register_console() if this is the first device plugged
......
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
#include <linux/kfifo.h> #include <linux/kfifo.h>
#include <linux/serial.h> #include <linux/serial.h>
static int debug;
#ifdef CONFIG_USB_SERIAL_GENERIC #ifdef CONFIG_USB_SERIAL_GENERIC
static __u16 vendor = 0x05f9; static __u16 vendor = 0x05f9;
...@@ -60,11 +58,10 @@ static struct usb_serial_driver * const serial_drivers[] = { ...@@ -60,11 +58,10 @@ static struct usb_serial_driver * const serial_drivers[] = {
#endif #endif
int usb_serial_generic_register(int _debug) int usb_serial_generic_register(void)
{ {
int retval = 0; int retval = 0;
debug = _debug;
#ifdef CONFIG_USB_SERIAL_GENERIC #ifdef CONFIG_USB_SERIAL_GENERIC
generic_device_ids[0].idVendor = vendor; generic_device_ids[0].idVendor = vendor;
generic_device_ids[0].idProduct = product; generic_device_ids[0].idProduct = product;
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
drivers depend on it. drivers depend on it.
*/ */
static bool debug;
/* initially all NULL */ /* initially all NULL */
static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; static struct usb_serial *serial_table[SERIAL_TTY_MINORS];
static DEFINE_MUTEX(table_lock); static DEFINE_MUTEX(table_lock);
...@@ -1074,7 +1073,7 @@ static int usb_serial_probe(struct usb_interface *interface, ...@@ -1074,7 +1073,7 @@ static int usb_serial_probe(struct usb_interface *interface,
serial->disconnected = 0; serial->disconnected = 0;
usb_serial_console_init(debug, minor); usb_serial_console_init(minor);
exit: exit:
module_put(type->driver.owner); module_put(type->driver.owner);
return 0; return 0;
...@@ -1259,7 +1258,7 @@ static int __init usb_serial_init(void) ...@@ -1259,7 +1258,7 @@ static int __init usb_serial_init(void)
} }
/* register the generic driver, if we should */ /* register the generic driver, if we should */
result = usb_serial_generic_register(debug); result = usb_serial_generic_register();
if (result < 0) { if (result < 0) {
pr_err("%s - registering generic driver failed\n", __func__); pr_err("%s - registering generic driver failed\n", __func__);
goto exit_generic; goto exit_generic;
...@@ -1464,6 +1463,3 @@ EXPORT_SYMBOL_GPL(usb_serial_deregister_drivers); ...@@ -1464,6 +1463,3 @@ EXPORT_SYMBOL_GPL(usb_serial_deregister_drivers);
MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC); MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_param(debug, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug enabled or not");
...@@ -307,11 +307,11 @@ extern int ezusb_set_reset(struct usb_device *dev, unsigned char reset_bit); ...@@ -307,11 +307,11 @@ extern int ezusb_set_reset(struct usb_device *dev, unsigned char reset_bit);
/* USB Serial console functions */ /* USB Serial console functions */
#ifdef CONFIG_USB_SERIAL_CONSOLE #ifdef CONFIG_USB_SERIAL_CONSOLE
extern void usb_serial_console_init(int debug, int minor); extern void usb_serial_console_init(int minor);
extern void usb_serial_console_exit(void); extern void usb_serial_console_exit(void);
extern void usb_serial_console_disconnect(struct usb_serial *serial); extern void usb_serial_console_disconnect(struct usb_serial *serial);
#else #else
static inline void usb_serial_console_init(int debug, int minor) { } static inline void usb_serial_console_init(int minor) { }
static inline void usb_serial_console_exit(void) { } static inline void usb_serial_console_exit(void) { }
static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
#endif #endif
...@@ -333,7 +333,7 @@ extern void usb_serial_generic_throttle(struct tty_struct *tty); ...@@ -333,7 +333,7 @@ extern void usb_serial_generic_throttle(struct tty_struct *tty);
extern void usb_serial_generic_unthrottle(struct tty_struct *tty); extern void usb_serial_generic_unthrottle(struct tty_struct *tty);
extern void usb_serial_generic_disconnect(struct usb_serial *serial); extern void usb_serial_generic_disconnect(struct usb_serial *serial);
extern void usb_serial_generic_release(struct usb_serial *serial); extern void usb_serial_generic_release(struct usb_serial *serial);
extern int usb_serial_generic_register(int debug); extern int usb_serial_generic_register(void);
extern void usb_serial_generic_deregister(void); extern void usb_serial_generic_deregister(void);
extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
gfp_t mem_flags); gfp_t mem_flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment