git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
s390
/
char
/
tty3270.c
diff --git
a/drivers/s390/char/tty3270.c
b/drivers/s390/char/tty3270.c
index
4b90693
..
0984462
100644
(file)
--- a/
drivers/s390/char/tty3270.c
+++ b/
drivers/s390/char/tty3270.c
@@
-8,7
+8,6
@@
* -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
*/
* -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
@@
-438,7
+437,7
@@
tty3270_rcl_add(struct tty3270 *tp, char *input, int len)
{
struct string *s;
{
struct string *s;
- tp->rcl_walk =
0
;
+ tp->rcl_walk =
NULL
;
if (len <= 0)
return;
if (tp->rcl_nr >= tp->rcl_max) {
if (len <= 0)
return;
if (tp->rcl_nr >= tp->rcl_max) {
@@
-467,12
+466,12
@@
tty3270_rcl_backward(struct kbd_data *kbd)
else if (!list_empty(&tp->rcl_lines))
tp->rcl_walk = tp->rcl_lines.prev;
s = tp->rcl_walk ?
else if (!list_empty(&tp->rcl_lines))
tp->rcl_walk = tp->rcl_lines.prev;
s = tp->rcl_walk ?
- list_entry(tp->rcl_walk, struct string, list) :
0
;
+ list_entry(tp->rcl_walk, struct string, list) :
NULL
;
if (tp->rcl_walk) {
s = list_entry(tp->rcl_walk, struct string, list);
tty3270_update_prompt(tp, s->string, s->len);
} else
if (tp->rcl_walk) {
s = list_entry(tp->rcl_walk, struct string, list);
tty3270_update_prompt(tp, s->string, s->len);
} else
- tty3270_update_prompt(tp,
0
, 0);
+ tty3270_update_prompt(tp,
NULL
, 0);
tty3270_set_timer(tp, 1);
}
spin_unlock_bh(&tp->view.lock);
tty3270_set_timer(tp, 1);
}
spin_unlock_bh(&tp->view.lock);
@@
-554,7
+553,7
@@
tty3270_read_tasklet(struct raw3270_request *rrq)
* has to be emitted to the tty and for 0x6d the screen
* needs to be redrawn.
*/
* has to be emitted to the tty and for 0x6d the screen
* needs to be redrawn.
*/
- input =
0
;
+ input =
NULL
;
len = 0;
if (tp->input->string[0] == 0x7d) {
/* Enter: write input to tty. */
len = 0;
if (tp->input->string[0] == 0x7d) {
/* Enter: write input to tty. */
@@
-568,7
+567,7
@@
tty3270_read_tasklet(struct raw3270_request *rrq)
tty3270_update_status(tp);
}
/* Clear input area. */
tty3270_update_status(tp);
}
/* Clear input area. */
- tty3270_update_prompt(tp,
0
, 0);
+ tty3270_update_prompt(tp,
NULL
, 0);
tty3270_set_timer(tp, 1);
} else if (tp->input->string[0] == 0x6d) {
/* Display has been cleared. Redraw. */
tty3270_set_timer(tp, 1);
} else if (tp->input->string[0] == 0x6d) {
/* Display has been cleared. Redraw. */
@@
-691,16
+690,14
@@
tty3270_alloc_view(void)
struct tty3270 *tp;
int pages;
struct tty3270 *tp;
int pages;
- tp = k
malloc(sizeof(struct tty3270),
GFP_KERNEL);
+ tp = k
zalloc(sizeof(struct tty3270),
GFP_KERNEL);
if (!tp)
goto out_err;
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)
goto out_tp;
INIT_LIST_HEAD(&tp->freemem);
tp->freemem_pages =
kmalloc(sizeof(void *) * TTY3270_STRING_PAGES, GFP_KERNEL);
if (!tp->freemem_pages)
goto out_tp;
INIT_LIST_HEAD(&tp->freemem);
- init_timer(&tp->timer);
for (pages = 0; pages < TTY3270_STRING_PAGES; pages++) {
tp->freemem_pages[pages] = (void *)
__get_free_pages(GFP_KERNEL|GFP_DMA, 0);
for (pages = 0; pages < TTY3270_STRING_PAGES; pages++) {
tp->freemem_pages[pages] = (void *)
__get_free_pages(GFP_KERNEL|GFP_DMA, 0);
@@
-767,16
+764,14
@@
tty3270_alloc_screen(struct tty3270 *tp)
int lines;
size = sizeof(struct tty3270_line) * (tp->view.rows - 2);
int lines;
size = sizeof(struct tty3270_line) * (tp->view.rows - 2);
- tp->screen = k
m
alloc(size, GFP_KERNEL);
+ tp->screen = k
z
alloc(size, GFP_KERNEL);
if (!tp->screen)
goto out_err;
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;
for (lines = 0; lines < tp->view.rows - 2; lines++) {
size = sizeof(struct tty3270_cell) * tp->view.cols;
- tp->screen[lines].cells = k
m
alloc(size, GFP_KERNEL);
+ tp->screen[lines].cells = k
z
alloc(size, GFP_KERNEL);
if (!tp->screen[lines].cells)
goto out_screen;
if (!tp->screen[lines].cells)
goto out_screen;
- memset(tp->screen[lines].cells, 0, size);
}
return 0;
out_screen:
}
return 0;
out_screen:
@@
-812,8
+807,8
@@
tty3270_release(struct raw3270_view *view)
tp = (struct tty3270 *) view;
tty = tp->tty;
if (tty) {
tp = (struct tty3270 *) view;
tty = tp->tty;
if (tty) {
- tty->driver_data =
0
;
- tp->tty = tp->kbd->tty =
0
;
+ tty->driver_data =
NULL
;
+ tp->tty = tp->kbd->tty =
NULL
;
tty_hangup(tty);
raw3270_put_view(&tp->view);
}
tty_hangup(tty);
raw3270_put_view(&tp->view);
}
@@
-952,8
+947,8
@@
tty3270_close(struct tty_struct *tty, struct file * filp)
return;
tp = (struct tty3270 *) tty->driver_data;
if (tp) {
return;
tp = (struct tty3270 *) tty->driver_data;
if (tp) {
- tty->driver_data =
0
;
- tp->tty = tp->kbd->tty =
0
;
+ tty->driver_data =
NULL
;
+ tp->tty = tp->kbd->tty =
NULL
;
raw3270_put_view(&tp->view);
}
}
raw3270_put_view(&tp->view);
}
}
@@
-1664,7
+1659,7
@@
tty3270_flush_buffer(struct tty_struct *tty)
* Check for visible/invisible input switches
*/
static void
* Check for visible/invisible input switches
*/
static void
-tty3270_set_termios(struct tty_struct *tty, struct termios *old)
+tty3270_set_termios(struct tty_struct *tty, struct
k
termios *old)
{
struct tty3270 *tp;
int new;
{
struct tty3270 *tp;
int new;
@@
-1677,7
+1672,7
@@
tty3270_set_termios(struct tty_struct *tty, struct termios *old)
new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN;
if (new != tp->inattr) {
tp->inattr = new;
new = L_ECHO(tty) ? TF_INPUT: TF_INPUTN;
if (new != tp->inattr) {
tp->inattr = new;
- tty3270_update_prompt(tp,
0
, 0);
+ tty3270_update_prompt(tp,
NULL
, 0);
tty3270_set_timer(tp, 1);
}
}
tty3270_set_timer(tp, 1);
}
}
@@
-1742,7
+1737,7
@@
tty3270_ioctl(struct tty_struct *tty, struct file *file,
return kbd_ioctl(tp->kbd, file, cmd, arg);
}
return kbd_ioctl(tp->kbd, file, cmd, arg);
}
-static struct tty_operations tty3270_ops = {
+static
const
struct tty_operations tty3270_ops = {
.open = tty3270_open,
.close = tty3270_close,
.write = tty3270_write,
.open = tty3270_open,
.close = tty3270_close,
.write = tty3270_write,
@@
-1763,7
+1758,7
@@
void
tty3270_notifier(int index, int active)
{
if (active)
tty3270_notifier(int index, int active)
{
if (active)
- tty_register_device(tty3270_driver, index,
0
);
+ tty_register_device(tty3270_driver, index,
NULL
);
else
tty_unregister_device(tty3270_driver, index);
}
else
tty_unregister_device(tty3270_driver, index);
}
@@
-1788,7
+1783,6
@@
tty3270_init(void)
* proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
*/
driver->owner = THIS_MODULE;
* 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;
driver->driver_name = "ttyTUB";
driver->name = "ttyTUB";
driver->major = IBM_TTY3270_MAJOR;
@@
-1796,7
+1790,7
@@
tty3270_init(void)
driver->type = TTY_DRIVER_TYPE_SYSTEM;
driver->subtype = SYSTEM_TYPE_TTY;
driver->init_termios = tty_std_termios;
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) {
tty_set_operations(driver, &tty3270_ops);
ret = tty_register_driver(driver);
if (ret) {
@@
-1823,7
+1817,7
@@
tty3270_exit(void)
raw3270_unregister_notifier(tty3270_notifier);
driver = tty3270_driver;
raw3270_unregister_notifier(tty3270_notifier);
driver = tty3270_driver;
- tty3270_driver =
0
;
+ tty3270_driver =
NULL
;
tty_unregister_driver(driver);
tty3270_del_views();
}
tty_unregister_driver(driver);
tty3270_del_views();
}