diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/consolemap.c | 2 | ||||
-rw-r--r-- | drivers/char/lcd.c | 2 | ||||
-rw-r--r-- | drivers/char/lp.c | 2 | ||||
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 2 | ||||
-rw-r--r-- | drivers/char/rio/riocmd.c | 2 | ||||
-rw-r--r-- | drivers/char/synclink.c | 2 | ||||
-rw-r--r-- | drivers/char/synclinkmp.c | 4 | ||||
-rw-r--r-- | drivers/char/vt.c | 2 | ||||
-rw-r--r-- | drivers/char/vt_ioctl.c | 4 |
9 files changed, 11 insertions, 11 deletions
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index 04a12027a740..b99b7561260d 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c | |||
@@ -443,7 +443,7 @@ int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui) | |||
443 | p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; | 443 | p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; |
444 | if (p && p->readonly) return -EIO; | 444 | if (p && p->readonly) return -EIO; |
445 | if (!p || --p->refcount) { | 445 | if (!p || --p->refcount) { |
446 | q = (struct uni_pagedir *)kmalloc(sizeof(*p), GFP_KERNEL); | 446 | q = kmalloc(sizeof(*p), GFP_KERNEL); |
447 | if (!q) { | 447 | if (!q) { |
448 | if (p) p->refcount++; | 448 | if (p) p->refcount++; |
449 | return -ENOMEM; | 449 | return -ENOMEM; |
diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c index da601fd6c07a..d649abbf0857 100644 --- a/drivers/char/lcd.c +++ b/drivers/char/lcd.c | |||
@@ -459,7 +459,7 @@ static int lcd_ioctl(struct inode *inode, struct file *file, | |||
459 | (&display, (struct lcd_display *) arg, | 459 | (&display, (struct lcd_display *) arg, |
460 | sizeof(struct lcd_display))) | 460 | sizeof(struct lcd_display))) |
461 | return -EFAULT; | 461 | return -EFAULT; |
462 | rom = (unsigned char *) kmalloc((128), GFP_ATOMIC); | 462 | rom = kmalloc((128), GFP_ATOMIC); |
463 | if (rom == NULL) { | 463 | if (rom == NULL) { |
464 | printk(KERN_ERR LCD "kmalloc() failed in %s\n", | 464 | printk(KERN_ERR LCD "kmalloc() failed in %s\n", |
465 | __FUNCTION__); | 465 | __FUNCTION__); |
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index b70b5388b5a8..b51d08be0bcf 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -525,7 +525,7 @@ static int lp_open(struct inode * inode, struct file * file) | |||
525 | return -EIO; | 525 | return -EIO; |
526 | } | 526 | } |
527 | } | 527 | } |
528 | lp_table[minor].lp_buffer = (char *) kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); | 528 | lp_table[minor].lp_buffer = kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); |
529 | if (!lp_table[minor].lp_buffer) { | 529 | if (!lp_table[minor].lp_buffer) { |
530 | LP_F(minor) &= ~LP_BUSY; | 530 | LP_F(minor) &= ~LP_BUSY; |
531 | return -ENOMEM; | 531 | return -ENOMEM; |
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 5152cedd8878..f108c136800a 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -541,7 +541,7 @@ static int mgslpc_probe(struct pcmcia_device *link) | |||
541 | if (debug_level >= DEBUG_LEVEL_INFO) | 541 | if (debug_level >= DEBUG_LEVEL_INFO) |
542 | printk("mgslpc_attach\n"); | 542 | printk("mgslpc_attach\n"); |
543 | 543 | ||
544 | info = (MGSLPC_INFO *)kmalloc(sizeof(MGSLPC_INFO), GFP_KERNEL); | 544 | info = kmalloc(sizeof(MGSLPC_INFO), GFP_KERNEL); |
545 | if (!info) { | 545 | if (!info) { |
546 | printk("Error can't allocate device instance data\n"); | 546 | printk("Error can't allocate device instance data\n"); |
547 | return -ENOMEM; | 547 | return -ENOMEM; |
diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c index 167ebc84e8d7..245f03195b7c 100644 --- a/drivers/char/rio/riocmd.c +++ b/drivers/char/rio/riocmd.c | |||
@@ -556,7 +556,7 @@ struct CmdBlk *RIOGetCmdBlk(void) | |||
556 | { | 556 | { |
557 | struct CmdBlk *CmdBlkP; | 557 | struct CmdBlk *CmdBlkP; |
558 | 558 | ||
559 | CmdBlkP = (struct CmdBlk *)kmalloc(sizeof(struct CmdBlk), GFP_ATOMIC); | 559 | CmdBlkP = kmalloc(sizeof(struct CmdBlk), GFP_ATOMIC); |
560 | if (CmdBlkP) | 560 | if (CmdBlkP) |
561 | memset(CmdBlkP, 0, sizeof(struct CmdBlk)); | 561 | memset(CmdBlkP, 0, sizeof(struct CmdBlk)); |
562 | return CmdBlkP; | 562 | return CmdBlkP; |
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index acc6fab601cc..3fa625db9e4b 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -4332,7 +4332,7 @@ static struct mgsl_struct* mgsl_allocate_device(void) | |||
4332 | { | 4332 | { |
4333 | struct mgsl_struct *info; | 4333 | struct mgsl_struct *info; |
4334 | 4334 | ||
4335 | info = (struct mgsl_struct *)kmalloc(sizeof(struct mgsl_struct), | 4335 | info = kmalloc(sizeof(struct mgsl_struct), |
4336 | GFP_KERNEL); | 4336 | GFP_KERNEL); |
4337 | 4337 | ||
4338 | if (!info) { | 4338 | if (!info) { |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 53e8ccf94fe3..8f4d67afe5bf 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -2730,7 +2730,7 @@ static int startup(SLMP_INFO * info) | |||
2730 | return 0; | 2730 | return 0; |
2731 | 2731 | ||
2732 | if (!info->tx_buf) { | 2732 | if (!info->tx_buf) { |
2733 | info->tx_buf = (unsigned char *)kmalloc(info->max_frame_size, GFP_KERNEL); | 2733 | info->tx_buf = kmalloc(info->max_frame_size, GFP_KERNEL); |
2734 | if (!info->tx_buf) { | 2734 | if (!info->tx_buf) { |
2735 | printk(KERN_ERR"%s(%d):%s can't allocate transmit buffer\n", | 2735 | printk(KERN_ERR"%s(%d):%s can't allocate transmit buffer\n", |
2736 | __FILE__,__LINE__,info->device_name); | 2736 | __FILE__,__LINE__,info->device_name); |
@@ -3798,7 +3798,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev) | |||
3798 | { | 3798 | { |
3799 | SLMP_INFO *info; | 3799 | SLMP_INFO *info; |
3800 | 3800 | ||
3801 | info = (SLMP_INFO *)kmalloc(sizeof(SLMP_INFO), | 3801 | info = kmalloc(sizeof(SLMP_INFO), |
3802 | GFP_KERNEL); | 3802 | GFP_KERNEL); |
3803 | 3803 | ||
3804 | if (!info) { | 3804 | if (!info) { |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index a8239dac994f..06c32a3e3ca4 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -784,7 +784,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines) | |||
784 | if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) | 784 | if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) |
785 | return 0; | 785 | return 0; |
786 | 786 | ||
787 | newscreen = (unsigned short *) kmalloc(new_screen_size, GFP_USER); | 787 | newscreen = kmalloc(new_screen_size, GFP_USER); |
788 | if (!newscreen) | 788 | if (!newscreen) |
789 | return -ENOMEM; | 789 | return -ENOMEM; |
790 | 790 | ||
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index 311493e7b409..dc8368ebb1ac 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -129,7 +129,7 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str | |||
129 | !capable(CAP_SYS_RESOURCE)) | 129 | !capable(CAP_SYS_RESOURCE)) |
130 | return -EPERM; | 130 | return -EPERM; |
131 | 131 | ||
132 | key_map = (ushort *) kmalloc(sizeof(plain_map), | 132 | key_map = kmalloc(sizeof(plain_map), |
133 | GFP_KERNEL); | 133 | GFP_KERNEL); |
134 | if (!key_map) | 134 | if (!key_map) |
135 | return -ENOMEM; | 135 | return -ENOMEM; |
@@ -259,7 +259,7 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm) | |||
259 | sz = 256; | 259 | sz = 256; |
260 | while (sz < funcbufsize - funcbufleft + delta) | 260 | while (sz < funcbufsize - funcbufleft + delta) |
261 | sz <<= 1; | 261 | sz <<= 1; |
262 | fnw = (char *) kmalloc(sz, GFP_KERNEL); | 262 | fnw = kmalloc(sz, GFP_KERNEL); |
263 | if(!fnw) { | 263 | if(!fnw) { |
264 | ret = -ENOMEM; | 264 | ret = -ENOMEM; |
265 | goto reterr; | 265 | goto reterr; |