]> err.no Git - linux-2.6/commitdiff
[PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Jun 2005 04:15:16 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Jun 2006 19:25:09 +0000 (12:25 -0700)
I've always found this flag confusing.  Now that devfs is no longer around, it
has been renamed, and the documentation for when this flag should be used has
been updated.

Also fixes all drivers that use this flag.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 files changed:
arch/cris/arch-v10/kernel/debugport.c
arch/cris/arch-v32/kernel/debugport.c
arch/ppc/4xx_io/serial_sicc.c
drivers/char/ip2/ip2main.c
drivers/char/pty.c
drivers/char/rocket.c
drivers/char/tty_io.c
drivers/isdn/gigaset/interface.c
drivers/isdn/i4l/isdn_tty.c
drivers/s390/char/tty3270.c
drivers/serial/crisv10.c
drivers/serial/serial_core.c
drivers/tc/zs.c
drivers/usb/class/cdc-acm.c
drivers/usb/gadget/serial.c
drivers/usb/serial/usb-serial.c
include/linux/tty_driver.h
net/bluetooth/rfcomm/tty.c

index f3a85b77c17e1c5b68596cf47d6e77587bfaa1bd..dde813e16294ddedf7b1a25264a3f2001c0c8834 100644 (file)
@@ -541,7 +541,7 @@ init_dummy_console(void)
        dummy_driver.init_termios = tty_std_termios;
        dummy_driver.init_termios.c_cflag =
                B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
-       dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
 
        dummy_driver.open = dummy_open;
        dummy_driver.close = dummy_close;
index ffc1ebf2dfee30b4a3b4ceb039236e4fea58d079..3dc587e6201aee865c762fa71a1807f5dffcd3d3 100644 (file)
@@ -353,7 +353,7 @@ init_dummy_console(void)
        dummy_driver.init_termios = tty_std_termios;
        dummy_driver.init_termios.c_cflag =
                B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
-       dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
 
        dummy_driver.open = dummy_open;
        dummy_driver.close = dummy_close;
index 98b25fa0049a2cbf561bee7400046f23b7976c1a..1e113d0f59b8e3cbfa760f1aec1734c4b530c313 100644 (file)
@@ -1758,7 +1758,7 @@ int __init siccuart_init(void)
     siccnormal_driver->subtype = SERIAL_TYPE_NORMAL;
     siccnormal_driver->init_termios = tty_std_termios;
     siccnormal_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-    siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+    siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
     tty_set_operations(siccnormal_driver, &sicc_ops);
 
     if (tty_register_driver(siccnormal_driver))
index 2db55d1f04038a3ccd9fa09205780e13e4bce2b7..8619542766cb28cfdda56efc600c97bbe7afe4e8 100644 (file)
@@ -678,7 +678,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
        ip2_tty_driver->subtype              = SERIAL_TYPE_NORMAL;
        ip2_tty_driver->init_termios         = tty_std_termios;
        ip2_tty_driver->init_termios.c_cflag = B9600|CS8|CREAD|HUPCL|CLOCAL;
-       ip2_tty_driver->flags                = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       ip2_tty_driver->flags                = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        tty_set_operations(ip2_tty_driver, &ip2_ops);
 
        ip2trace (ITRC_NO_PORT, ITRC_INIT, 3, 0 );
index d3a5092402c26c9823072ad69b25298ac44b87c1..f373d0155a77bf1d81a990ec3f556c051f079499 100644 (file)
@@ -368,7 +368,7 @@ static void __init unix98_pty_init(void)
        ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
        ptm_driver->init_termios.c_lflag = 0;
        ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
-               TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM;
+               TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM;
        ptm_driver->other = pts_driver;
        tty_set_operations(ptm_driver, &pty_ops);
        ptm_driver->ioctl = pty_unix98_ioctl;
@@ -383,7 +383,7 @@ static void __init unix98_pty_init(void)
        pts_driver->init_termios = tty_std_termios;
        pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD;
        pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW |
-               TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM;
+               TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM;
        pts_driver->other = ptm_driver;
        tty_set_operations(pts_driver, &pty_ops);
        
index ed511ec9b578b0e8807215f4116a2013ba0e4897..0ac131881322c96920b049c45e8aa64d5fbdb635 100644 (file)
@@ -2426,7 +2426,7 @@ static int __init rp_init(void)
         */
 
        rocket_driver->owner = THIS_MODULE;
-       rocket_driver->flags = TTY_DRIVER_NO_DEVFS;
+       rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV;
        rocket_driver->name = "ttyR";
        rocket_driver->driver_name = "Comtrol RocketPort";
        rocket_driver->major = TTY_ROCKET_MAJOR;
@@ -2437,7 +2437,7 @@ static int __init rp_init(void)
        rocket_driver->init_termios.c_cflag =
            B9600 | CS8 | CREAD | HUPCL | CLOCAL;
 #ifdef ROCKET_SOFT_FLOW
-       rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
 #endif
        tty_set_operations(rocket_driver, &rocket_ops);
 
index ebe1158e6c6ecfc950983973bb61408eed0ce662..6c79ff3030fac538bbd504f1b5177d1e8115210f 100644 (file)
@@ -2963,8 +2963,8 @@ static struct class *tty_class;
  * Returns a pointer to the class device (or ERR_PTR(-EFOO) on error).
  *
  * This call is required to be made to register an individual tty device if
- * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set.  If that
- * bit is not set, this function should not be called.
+ * the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If that
+ * bit is not set, this function should not be called by a tty driver.
  */
 struct class_device *tty_register_device(struct tty_driver *driver,
                                         unsigned index, struct device *device)
@@ -3117,7 +3117,7 @@ int tty_register_driver(struct tty_driver *driver)
        
        list_add(&driver->tty_drivers, &tty_drivers);
        
-       if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) {
+       if ( !(driver->flags & TTY_DRIVER_DYNAMIC_DEV) ) {
                for(i = 0; i < driver->num; i++)
                    tty_register_device(driver, i, NULL);
        }
@@ -3160,7 +3160,7 @@ int tty_unregister_driver(struct tty_driver *driver)
                        driver->termios_locked[i] = NULL;
                        kfree(tp);
                }
-               if (!(driver->flags & TTY_DRIVER_NO_DEVFS))
+               if (!(driver->flags & TTY_DRIVER_DYNAMIC_DEV))
                        tty_unregister_device(driver, i);
        }
        p = driver->ttys;
index 9f8628bbdf569833a9ab1199ba6cf014913127fe..bd2e4267528e58aadbcb4f770f75b4cccbc72ba0 100644 (file)
@@ -691,7 +691,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
        tty->major =            GIG_MAJOR,
        tty->type =             TTY_DRIVER_TYPE_SERIAL,
        tty->subtype =          SERIAL_TYPE_NORMAL,
-       tty->flags =            TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
+       tty->flags =            TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
 
        tty->driver_name =      procname;
        tty->name =             devname;
index e7f0f15c73532a300a12203c00abffe83ab36ce8..77579f82aede6e2df287befa2668ba14e27cd7c2 100644 (file)
@@ -1896,7 +1896,7 @@ isdn_tty_modem_init(void)
        m->tty_modem->subtype = SERIAL_TYPE_NORMAL;
        m->tty_modem->init_termios = tty_std_termios;
        m->tty_modem->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-       m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        m->tty_modem->driver_name = "isdn_tty";
        tty_set_operations(m->tty_modem, &modem_ops);
        retval = tty_register_driver(m->tty_modem);
index 43c8c9f5f301304dd440ef84d0e359634daa6d31..7d26a3e4cb80797f10256e5de65f389f619cd960 100644 (file)
@@ -1792,7 +1792,7 @@ tty3270_init(void)
        driver->type = TTY_DRIVER_TYPE_SYSTEM;
        driver->subtype = SYSTEM_TYPE_TTY;
        driver->init_termios = tty_std_termios;
-       driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_NO_DEVFS;
+       driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_DYNAMIC_DEV;
        tty_set_operations(driver, &tty3270_ops);
        ret = tty_register_driver(driver);
        if (ret) {
index 89700141f87e0d41b462ce6881a9f0a775d98549..2364c39499812ed2507b0150a942e2fa1dea88d3 100644 (file)
@@ -4884,7 +4884,7 @@ rs_init(void)
        driver->init_termios = tty_std_termios;
        driver->init_termios.c_cflag =
                B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */
-       driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        driver->termios = serial_termios;
        driver->termios_locked = serial_termios_locked;
 
index 84d70d85559853e30e75c9b34a16466917f0d6cd..7dc1e67b6851b2e0ade005e73be8aea60a7df782 100644 (file)
@@ -2160,7 +2160,7 @@ int uart_register_driver(struct uart_driver *drv)
        normal->subtype         = SERIAL_TYPE_NORMAL;
        normal->init_termios    = tty_std_termios;
        normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-       normal->flags           = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       normal->flags           = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        normal->driver_state    = drv;
        tty_set_operations(normal, &uart_ops);
 
index 582d926cd000b236a1e9caa089a9a717ed932a13..7f27b356eaf723450d3598db9d62a60a5ab3a441 100644 (file)
@@ -1753,7 +1753,7 @@ int __init zs_init(void)
        serial_driver->init_termios = tty_std_termios;
        serial_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-       serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        tty_set_operations(serial_driver, &serial_ops);
 
        if (tty_register_driver(serial_driver))
index a0b9eddd98e4976c1b3977ee608cd6b726a8ce00..3670d77e912ca4a068a3dc46e93ae8696aeca242 100644 (file)
@@ -1149,7 +1149,7 @@ static int __init acm_init(void)
        acm_tty_driver->minor_start = 0,
        acm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL,
        acm_tty_driver->subtype = SERIAL_TYPE_NORMAL,
-       acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
+       acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        acm_tty_driver->init_termios = tty_std_termios;
        acm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
        tty_set_operations(acm_tty_driver, &acm_ops);
index 2c8e5c10eb9ffcc9a10f53913ad194ab3cda9b2c..416acac879df5d3b96d43d99bfe984a3bb9081bd 100644 (file)
@@ -592,7 +592,7 @@ static int __init gs_module_init(void)
        gs_tty_driver->minor_start = GS_MINOR_START;
        gs_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
        gs_tty_driver->subtype = SERIAL_TYPE_NORMAL;
-       gs_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       gs_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        gs_tty_driver->init_termios = tty_std_termios;
        gs_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
        tty_set_operations(gs_tty_driver, &gs_tty_ops);
index db7f54b0d85612ba6bce79e44354e01f7c7f074a..f466f89eeb6d542353652fe0f9d1a77f631f9fe6 100644 (file)
@@ -1064,7 +1064,7 @@ static int __init usb_serial_init(void)
        usb_serial_tty_driver->minor_start = 0;
        usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
        usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL;
-       usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        usb_serial_tty_driver->init_termios = tty_std_termios;
        usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
        tty_set_operations(usb_serial_tty_driver, &serial_ops);
index 0bd31f0830f96f9b58d9f5438d69537c70781b39..58c961c9e1707027fe8989bfa821c78121fdb183 100644 (file)
@@ -241,8 +241,15 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
  *     is also a promise, if the above case is true, not to signal
  *     overruns, either.)
  *
- * TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This
- *     is only used by tty_register_driver().
+ * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need
+ *     to be registered with a call to tty_register_driver() when the
+ *     device is found in the system and unregistered with a call to
+ *     tty_unregister_device() so the devices will be show up
+ *     properly in sysfs.  If not set, driver->num entries will be
+ *     created by the tty core in sysfs when tty_register_driver() is
+ *     called.  This is to be used by drivers that have tty devices
+ *     that can appear and disappear while the main tty driver is
+ *     registered with the tty core.
  *
  * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead
  *     use dynamic memory keyed through the devpts filesystem.  This
@@ -251,7 +258,7 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op);
 #define TTY_DRIVER_INSTALLED           0x0001
 #define TTY_DRIVER_RESET_TERMIOS       0x0002
 #define TTY_DRIVER_REAL_RAW            0x0004
-#define TTY_DRIVER_NO_DEVFS            0x0008
+#define TTY_DRIVER_DYNAMIC_DEV         0x0008
 #define TTY_DRIVER_DEVPTS_MEM          0x0010
 
 /* tty driver types */
index afb3c524db3444f64962116233af913d59ca354b..5fdc36678621af43de7226629927f61bb8f58b54 100644 (file)
@@ -1030,7 +1030,7 @@ int rfcomm_init_ttys(void)
        rfcomm_tty_driver->minor_start  = RFCOMM_TTY_MINOR;
        rfcomm_tty_driver->type         = TTY_DRIVER_TYPE_SERIAL;
        rfcomm_tty_driver->subtype      = SERIAL_TYPE_NORMAL;
-       rfcomm_tty_driver->flags        = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       rfcomm_tty_driver->flags        = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        rfcomm_tty_driver->init_termios = tty_std_termios;
        rfcomm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
        tty_set_operations(rfcomm_tty_driver, &rfcomm_ops);