]> err.no Git - linux-2.6/blobdiff - drivers/s390/char/tty3270.c
[PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
[linux-2.6] / drivers / s390 / char / tty3270.c
index 4b90693703881fc61c517fdb36ce5c724774e222..7d26a3e4cb80797f10256e5de65f389f619cd960 100644 (file)
@@ -691,10 +691,9 @@ tty3270_alloc_view(void)
        struct tty3270 *tp;
        int pages;
 
-       tp = kmalloc(sizeof(struct tty3270),GFP_KERNEL);
+       tp = kzalloc(sizeof(struct tty3270), GFP_KERNEL);
        if (!tp)
                goto out_err;
-       memset(tp, 0, sizeof(struct tty3270));
        tp->freemem_pages =
                kmalloc(sizeof(void *) * TTY3270_STRING_PAGES, GFP_KERNEL);
        if (!tp->freemem_pages)
@@ -767,16 +766,14 @@ tty3270_alloc_screen(struct tty3270 *tp)
        int lines;
 
        size = sizeof(struct tty3270_line) * (tp->view.rows - 2);
-       tp->screen = kmalloc(size, GFP_KERNEL);
+       tp->screen = kzalloc(size, GFP_KERNEL);
        if (!tp->screen)
                goto out_err;
-       memset(tp->screen, 0, size);
        for (lines = 0; lines < tp->view.rows - 2; lines++) {
                size = sizeof(struct tty3270_cell) * tp->view.cols;
-               tp->screen[lines].cells = kmalloc(size, GFP_KERNEL);
+               tp->screen[lines].cells = kzalloc(size, GFP_KERNEL);
                if (!tp->screen[lines].cells)
                        goto out_screen;
-               memset(tp->screen[lines].cells, 0, size);
        }
        return 0;
 out_screen:
@@ -1788,7 +1785,6 @@ tty3270_init(void)
         * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
         */
        driver->owner = THIS_MODULE;
-       driver->devfs_name = "ttyTUB/";
        driver->driver_name = "ttyTUB";
        driver->name = "ttyTUB";
        driver->major = IBM_TTY3270_MAJOR;
@@ -1796,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) {