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
/
net
/
wan
/
x25_asy.c
diff --git
a/drivers/net/wan/x25_asy.c
b/drivers/net/wan/x25_asy.c
index
1c540d8
..
1c9edd9
100644
(file)
--- a/
drivers/net/wan/x25_asy.c
+++ b/
drivers/net/wan/x25_asy.c
@@
-123,8
+123,8
@@
static int x25_asy_change_mtu(struct net_device *dev, int newmtu)
unsigned char *xbuff, *rbuff;
int len = 2* newmtu;
unsigned char *xbuff, *rbuff;
int len = 2* newmtu;
- xbuff =
(unsigned char *) kmalloc
(len + 4, GFP_ATOMIC);
- rbuff =
(unsigned char *) kmalloc
(len + 4, GFP_ATOMIC);
+ xbuff =
kmalloc
(len + 4, GFP_ATOMIC);
+ rbuff =
kmalloc
(len + 4, GFP_ATOMIC);
if (xbuff == NULL || rbuff == NULL)
{
if (xbuff == NULL || rbuff == NULL)
{
@@
-465,11
+465,11
@@
static int x25_asy_open(struct net_device *dev)
len = dev->mtu * 2;
len = dev->mtu * 2;
- sl->rbuff =
(unsigned char *)
kmalloc(len + 4, GFP_KERNEL);
+ sl->rbuff = kmalloc(len + 4, GFP_KERNEL);
if (sl->rbuff == NULL) {
goto norbuff;
}
if (sl->rbuff == NULL) {
goto norbuff;
}
- sl->xbuff =
(unsigned char *)
kmalloc(len + 4, GFP_KERNEL);
+ sl->xbuff = kmalloc(len + 4, GFP_KERNEL);
if (sl->xbuff == NULL) {
goto noxbuff;
}
if (sl->xbuff == NULL) {
goto noxbuff;
}
@@
-515,11
+515,6
@@
static int x25_asy_close(struct net_device *dev)
return 0;
}
return 0;
}
-static int x25_asy_receive_room(struct tty_struct *tty)
-{
- return 65536; /* We can handle an infinite amount of data. :-) */
-}
-
/*
* Handle the 'receiver data ready' interrupt.
* This function is called by the 'tty_io' module in the kernel when
/*
* Handle the 'receiver data ready' interrupt.
* This function is called by the 'tty_io' module in the kernel when
@@
-573,6
+568,7
@@
static int x25_asy_open_tty(struct tty_struct *tty)
sl->tty = tty;
tty->disc_data = sl;
sl->tty = tty;
tty->disc_data = sl;
+ tty->receive_room = 65536;
if (tty->driver->flush_buffer) {
tty->driver->flush_buffer(tty);
}
if (tty->driver->flush_buffer) {
tty->driver->flush_buffer(tty);
}
@@
-779,7
+775,6
@@
static struct tty_ldisc x25_ldisc = {
.close = x25_asy_close_tty,
.ioctl = x25_asy_ioctl,
.receive_buf = x25_asy_receive_buf,
.close = x25_asy_close_tty,
.ioctl = x25_asy_ioctl,
.receive_buf = x25_asy_receive_buf,
- .receive_room = x25_asy_receive_room,
.write_wakeup = x25_asy_write_wakeup,
};
.write_wakeup = x25_asy_write_wakeup,
};
@@
-829,7
+824,7
@@
static void __exit exit_x25_asy(void)
}
kfree(x25_asy_devs);
}
kfree(x25_asy_devs);
- tty_
register_ldisc(N_X25, NULL
);
+ tty_
unregister_ldisc(N_X25
);
}
module_init(init_x25_asy);
}
module_init(init_x25_asy);