X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fide%2Fide-tape.c;h=c6eec0413a6c5f323bf67798554a6a794747773e;hb=2b8693c0617e972fc0b2fd1ebf8de97e15b656c3;hp=e2f4bb5490638de5c1326dc863c322417c99002b;hpb=e30fdb1e026c2d05f216d2e5a25bfafdfd261ec2;p=linux-2.6 diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index e2f4bb5490..c6eec0413a 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -2573,11 +2573,11 @@ static idetape_stage_t *__idetape_kmalloc_stage (idetape_tape_t *tape, int full, int pages = tape->pages_per_stage; char *b_data = NULL; - if ((stage = (idetape_stage_t *) kmalloc (sizeof (idetape_stage_t),GFP_KERNEL)) == NULL) + if ((stage = kmalloc(sizeof (idetape_stage_t),GFP_KERNEL)) == NULL) return NULL; stage->next = NULL; - bh = stage->bh = (struct idetape_bh *)kmalloc(sizeof(struct idetape_bh), GFP_KERNEL); + bh = stage->bh = kmalloc(sizeof(struct idetape_bh), GFP_KERNEL); if (bh == NULL) goto abort; bh->b_reqnext = NULL; @@ -2607,7 +2607,7 @@ static idetape_stage_t *__idetape_kmalloc_stage (idetape_tape_t *tape, int full, continue; } prev_bh = bh; - if ((bh = (struct idetape_bh *)kmalloc(sizeof(struct idetape_bh), GFP_KERNEL)) == NULL) { + if ((bh = kmalloc(sizeof(struct idetape_bh), GFP_KERNEL)) == NULL) { free_page((unsigned long) b_data); goto abort; } @@ -4779,7 +4779,7 @@ static ide_driver_t idetape_driver = { /* * Our character device supporting functions, passed to register_chrdev. */ -static struct file_operations idetape_fops = { +static const struct file_operations idetape_fops = { .owner = THIS_MODULE, .read = idetape_chrdev_read, .write = idetape_chrdev_write, @@ -4860,7 +4860,7 @@ static int ide_tape_probe(ide_drive_t *drive) printk(KERN_WARNING "ide-tape: Use drive %s with ide-scsi emulation and osst.\n", drive->name); printk(KERN_WARNING "ide-tape: OnStream support will be removed soon from ide-tape!\n"); } - tape = (idetape_tape_t *) kzalloc (sizeof (idetape_tape_t), GFP_KERNEL); + tape = kzalloc(sizeof (idetape_tape_t), GFP_KERNEL); if (tape == NULL) { printk(KERN_ERR "ide-tape: %s: Can't allocate a tape structure\n", drive->name); goto failed;