X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Firda%2Fircomm%2Fircomm_tty.c;h=6f20b4206e08a56bc3b79902b9fededeac826cd9;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=3bcdb467efc5658dd525d924acfd3faffd2adccb;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 3bcdb467e..6f20b4206 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c @@ -30,6 +30,7 @@ * ********************************************************************/ +#include #include #include #include @@ -123,6 +124,7 @@ static int __init ircomm_tty_init(void) driver->owner = THIS_MODULE; driver->driver_name = "ircomm"; driver->name = "ircomm"; + driver->devfs_name = "ircomm"; driver->major = IRCOMM_TTY_MAJOR; driver->minor_start = IRCOMM_TTY_MINOR; driver->type = TTY_DRIVER_TYPE_SERIAL; @@ -379,11 +381,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) self = hashbin_lock_find(ircomm_tty, line, NULL); if (!self) { /* No, so make new instance */ - self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); + self = kmalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); if (self == NULL) { IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); return -ENOMEM; } + memset(self, 0, sizeof(struct ircomm_tty_cb)); self->magic = IRCOMM_TTY_MAGIC; self->flow = FLOW_STOP; @@ -758,9 +761,8 @@ static int ircomm_tty_write(struct tty_struct *tty, } } else { /* Prepare a full sized frame */ - skb = alloc_skb(self->max_data_size+ - self->max_header_size, - GFP_ATOMIC); + skb = dev_alloc_skb(self->max_data_size+ + self->max_header_size); if (!skb) { spin_unlock_irqrestore(&self->spinlock, flags); return -ENOBUFS;