diff options
Diffstat (limited to 'drivers/isdn/capi/capi.c')
-rw-r--r-- | drivers/isdn/capi/capi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 11844bbfe933..d22c0224fde6 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -215,13 +215,12 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) | |||
215 | unsigned int minor = 0; | 215 | unsigned int minor = 0; |
216 | unsigned long flags; | 216 | unsigned long flags; |
217 | 217 | ||
218 | mp = kmalloc(sizeof(*mp), GFP_ATOMIC); | 218 | mp = kzalloc(sizeof(*mp), GFP_ATOMIC); |
219 | if (!mp) { | 219 | if (!mp) { |
220 | printk(KERN_ERR "capi: can't alloc capiminor\n"); | 220 | printk(KERN_ERR "capi: can't alloc capiminor\n"); |
221 | return NULL; | 221 | return NULL; |
222 | } | 222 | } |
223 | 223 | ||
224 | memset(mp, 0, sizeof(struct capiminor)); | ||
225 | mp->ap = ap; | 224 | mp->ap = ap; |
226 | mp->ncci = ncci; | 225 | mp->ncci = ncci; |
227 | mp->msgid = 0; | 226 | mp->msgid = 0; |
@@ -304,10 +303,9 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci) | |||
304 | struct capiminor *mp = NULL; | 303 | struct capiminor *mp = NULL; |
305 | #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ | 304 | #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ |
306 | 305 | ||
307 | np = kmalloc(sizeof(*np), GFP_ATOMIC); | 306 | np = kzalloc(sizeof(*np), GFP_ATOMIC); |
308 | if (!np) | 307 | if (!np) |
309 | return NULL; | 308 | return NULL; |
310 | memset(np, 0, sizeof(struct capincci)); | ||
311 | np->ncci = ncci; | 309 | np->ncci = ncci; |
312 | np->cdev = cdev; | 310 | np->cdev = cdev; |
313 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE | 311 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE |
@@ -384,10 +382,9 @@ static struct capidev *capidev_alloc(void) | |||
384 | struct capidev *cdev; | 382 | struct capidev *cdev; |
385 | unsigned long flags; | 383 | unsigned long flags; |
386 | 384 | ||
387 | cdev = kmalloc(sizeof(*cdev), GFP_KERNEL); | 385 | cdev = kzalloc(sizeof(*cdev), GFP_KERNEL); |
388 | if (!cdev) | 386 | if (!cdev) |
389 | return NULL; | 387 | return NULL; |
390 | memset(cdev, 0, sizeof(struct capidev)); | ||
391 | 388 | ||
392 | init_MUTEX(&cdev->ncci_list_sem); | 389 | init_MUTEX(&cdev->ncci_list_sem); |
393 | skb_queue_head_init(&cdev->recvqueue); | 390 | skb_queue_head_init(&cdev->recvqueue); |
@@ -1010,7 +1007,7 @@ static int capinc_tty_open(struct tty_struct * tty, struct file * file) | |||
1010 | { | 1007 | { |
1011 | struct capiminor *mp; | 1008 | struct capiminor *mp; |
1012 | 1009 | ||
1013 | if ((mp = capiminor_find(iminor(file->f_dentry->d_inode))) == 0) | 1010 | if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == 0) |
1014 | return -ENXIO; | 1011 | return -ENXIO; |
1015 | if (mp->nccip == 0) | 1012 | if (mp->nccip == 0) |
1016 | return -ENXIO; | 1013 | return -ENXIO; |
@@ -1203,7 +1200,7 @@ static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file, | |||
1203 | return error; | 1200 | return error; |
1204 | } | 1201 | } |
1205 | 1202 | ||
1206 | static void capinc_tty_set_termios(struct tty_struct *tty, struct termios * old) | 1203 | static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old) |
1207 | { | 1204 | { |
1208 | #ifdef _DEBUG_TTYFUNCS | 1205 | #ifdef _DEBUG_TTYFUNCS |
1209 | printk(KERN_DEBUG "capinc_tty_set_termios\n"); | 1206 | printk(KERN_DEBUG "capinc_tty_set_termios\n"); |