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 04a12027a74..b99b7561260 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) p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc; if (p && p->readonly) return -EIO; if (!p || --p->refcount) { - q = (struct uni_pagedir *)kmalloc(sizeof(*p), GFP_KERNEL); + q = kmalloc(sizeof(*p), GFP_KERNEL); if (!q) { if (p) p->refcount++; return -ENOMEM; diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c index da601fd6c07..d649abbf085 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, (&display, (struct lcd_display *) arg, sizeof(struct lcd_display))) return -EFAULT; - rom = (unsigned char *) kmalloc((128), GFP_ATOMIC); + rom = kmalloc((128), GFP_ATOMIC); if (rom == NULL) { printk(KERN_ERR LCD "kmalloc() failed in %s\n", __FUNCTION__); diff --git a/drivers/char/lp.c b/drivers/char/lp.c index b70b5388b5a..b51d08be0bc 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) return -EIO; } } - lp_table[minor].lp_buffer = (char *) kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); + lp_table[minor].lp_buffer = kmalloc(LP_BUFFER_SIZE, GFP_KERNEL); if (!lp_table[minor].lp_buffer) { LP_F(minor) &= ~LP_BUSY; return -ENOMEM; diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 5152cedd887..f108c136800 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) if (debug_level >= DEBUG_LEVEL_INFO) printk("mgslpc_attach\n"); - info = (MGSLPC_INFO *)kmalloc(sizeof(MGSLPC_INFO), GFP_KERNEL); + info = kmalloc(sizeof(MGSLPC_INFO), GFP_KERNEL); if (!info) { printk("Error can't allocate device instance data\n"); return -ENOMEM; diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c index 167ebc84e8d..245f03195b7 100644 --- a/drivers/char/rio/riocmd.c +++ b/drivers/char/rio/riocmd.c @@ -556,7 +556,7 @@ struct CmdBlk *RIOGetCmdBlk(void) { struct CmdBlk *CmdBlkP; - CmdBlkP = (struct CmdBlk *)kmalloc(sizeof(struct CmdBlk), GFP_ATOMIC); + CmdBlkP = kmalloc(sizeof(struct CmdBlk), GFP_ATOMIC); if (CmdBlkP) memset(CmdBlkP, 0, sizeof(struct CmdBlk)); return CmdBlkP; diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index acc6fab601c..3fa625db9e4 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c @@ -4332,7 +4332,7 @@ static struct mgsl_struct* mgsl_allocate_device(void) { struct mgsl_struct *info; - info = (struct mgsl_struct *)kmalloc(sizeof(struct mgsl_struct), + info = kmalloc(sizeof(struct mgsl_struct), GFP_KERNEL); if (!info) { diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 53e8ccf94fe..8f4d67afe5b 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c @@ -2730,7 +2730,7 @@ static int startup(SLMP_INFO * info) return 0; if (!info->tx_buf) { - info->tx_buf = (unsigned char *)kmalloc(info->max_frame_size, GFP_KERNEL); + info->tx_buf = kmalloc(info->max_frame_size, GFP_KERNEL); if (!info->tx_buf) { printk(KERN_ERR"%s(%d):%s can't allocate transmit buffer\n", __FILE__,__LINE__,info->device_name); @@ -3798,7 +3798,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev) { SLMP_INFO *info; - info = (SLMP_INFO *)kmalloc(sizeof(SLMP_INFO), + info = kmalloc(sizeof(SLMP_INFO), GFP_KERNEL); if (!info) { diff --git a/drivers/char/vt.c b/drivers/char/vt.c index a8239dac994..06c32a3e3ca 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) if (new_cols == vc->vc_cols && new_rows == vc->vc_rows) return 0; - newscreen = (unsigned short *) kmalloc(new_screen_size, GFP_USER); + newscreen = kmalloc(new_screen_size, GFP_USER); if (!newscreen) return -ENOMEM; diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index 311493e7b40..dc8368ebb1a 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 !capable(CAP_SYS_RESOURCE)) return -EPERM; - key_map = (ushort *) kmalloc(sizeof(plain_map), + key_map = kmalloc(sizeof(plain_map), GFP_KERNEL); if (!key_map) return -ENOMEM; @@ -259,7 +259,7 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm) sz = 256; while (sz < funcbufsize - funcbufleft + delta) sz <<= 1; - fnw = (char *) kmalloc(sz, GFP_KERNEL); + fnw = kmalloc(sz, GFP_KERNEL); if(!fnw) { ret = -ENOMEM; goto reterr; |