]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/fwserial: Add Kconfig options for max ports
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 22 Nov 2013 18:06:11 +0000 (13:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 01:03:03 +0000 (17:03 -0800)
Allow kernel configuration of max supported ports for
TTY-over-Firewire driver.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fwserial/Kconfig
drivers/staging/fwserial/fwserial.h

index a0812d99136f5e171c277e88f637579cfea4c71c..9c7c9267d52cb3a62dd80452930ad33269bf2951 100644 (file)
@@ -9,3 +9,23 @@ config FIREWIRE_SERIAL
 
          To compile this driver as a module, say M here:  the module will
          be called firewire-serial.
+
+if FIREWIRE_SERIAL
+
+config FWTTY_MAX_TOTAL_PORTS
+       int "Maximum number of serial ports supported"
+       default "64"
+       help
+          Set this to the maximum number of serial ports you want the
+         firewire-serial driver to support.
+
+config FWTTY_MAX_CARD_PORTS
+       int "Maximum number of serial ports supported per adapter"
+       range 0 FWTTY_MAX_TOTAL_PORTS
+       default "32"
+       help
+          Set this to the maximum number of serial ports each firewire
+         adapter supports. The actual number of serial ports registered
+         is set with the module parameter "ttys".
+
+endif
index eab85b49293c2ee7e518a4d7c8b4e6fcc22565ac..54f7f9b9b2123a120a48595a878723b5d89d465e 100644 (file)
@@ -291,8 +291,8 @@ struct fwtty_port {
 #define FREQ_BREAKS        (HZ / 50)
 
 /* Ports are allocated in blocks of num_ports for each fw_card */
-#define MAX_CARD_PORTS           32    /* max # of ports per card */
-#define MAX_TOTAL_PORTS          64    /* max # of ports total    */
+#define MAX_CARD_PORTS           CONFIG_FWTTY_MAX_CARD_PORTS
+#define MAX_TOTAL_PORTS          CONFIG_FWTTY_MAX_TOTAL_PORTS
 
 /* tuning parameters */
 #define FWTTY_PORT_TXFIFO_LEN  4096