X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fide%2Fide-tape.c;h=e2f4bb5490638de5c1326dc863c322417c99002b;hb=d56b9b9c464a10ab1ee51a4c6190a2b57b8ef7a6;hp=09f3a7dab28ade081cd5e0fe94120aaa96fc8e8d;hpb=2a2ed2db353d949c06b6ef8b6913f65b39111eab;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 09f3a7dab28..e2f4bb54906 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -424,7 +424,6 @@ #define IDETAPE_VERSION "1.19" -#include #include #include #include @@ -435,7 +434,6 @@ #include #include #include -#include #include #include #include @@ -1778,7 +1776,7 @@ static void idetape_create_request_sense_cmd (idetape_pc_t *pc) static void idetape_init_rq(struct request *rq, u8 cmd) { memset(rq, 0, sizeof(*rq)); - rq->flags = REQ_SPECIAL; + rq->cmd_type = REQ_TYPE_SPECIAL; rq->cmd[0] = cmd; } @@ -2425,8 +2423,8 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, #if IDETAPE_DEBUG_LOG #if 0 if (tape->debug_level >= 5) - printk(KERN_INFO "ide-tape: rq_status: %d, " - "dev: %s, cmd: %ld, errors: %d\n", rq->rq_status, + printk(KERN_INFO "ide-tape: %d, " + "dev: %s, cmd: %ld, errors: %d\n", rq->rq_disk->disk_name, rq->cmd[0], rq->errors); #endif if (tape->debug_level >= 2) @@ -2435,12 +2433,12 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, rq->sector, rq->nr_sectors, rq->current_nr_sectors); #endif /* IDETAPE_DEBUG_LOG */ - if ((rq->flags & REQ_SPECIAL) == 0) { + if (!blk_special_request(rq)) { /* * We do not support buffer cache originated requests. */ printk(KERN_NOTICE "ide-tape: %s: Unsupported request in " - "request queue (%ld)\n", drive->name, rq->flags); + "request queue (%d)\n", drive->name, rq->cmd_type); ide_end_request(drive, 0, 0); return ide_stopped; } @@ -2766,16 +2764,16 @@ static void idetape_add_stage_tail (ide_drive_t *drive,idetape_stage_t *stage) */ static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq) { - DECLARE_COMPLETION(wait); + DECLARE_COMPLETION_ONSTACK(wait); idetape_tape_t *tape = drive->driver_data; #if IDETAPE_DEBUG_BUGS - if (rq == NULL || (rq->flags & REQ_SPECIAL) == 0) { + if (rq == NULL || !blk_special_request(rq)) { printk (KERN_ERR "ide-tape: bug: Trying to sleep on non-valid request\n"); return; } #endif /* IDETAPE_DEBUG_BUGS */ - rq->waiting = &wait; + rq->end_io_data = &wait; rq->end_io = blk_end_sync_rq; spin_unlock_irq(&tape->spinlock); wait_for_completion(&wait); @@ -4726,9 +4724,6 @@ static void ide_tape_release(struct kref *kref) MKDEV(IDETAPE_MAJOR, tape->minor)); class_device_destroy(idetape_sysfs_class, MKDEV(IDETAPE_MAJOR, tape->minor + 128)); - devfs_remove("%s/mt", drive->devfs_name); - devfs_remove("%s/mtn", drive->devfs_name); - devfs_unregister_tape(g->number); idetape_devs[tape->minor] = NULL; g->private_data = NULL; put_disk(g); @@ -4902,14 +4897,6 @@ static int ide_tape_probe(ide_drive_t *drive) class_device_create(idetape_sysfs_class, NULL, MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name); - devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), - S_IFCHR | S_IRUGO | S_IWUGO, - "%s/mt", drive->devfs_name); - devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor + 128), - S_IFCHR | S_IRUGO | S_IWUGO, - "%s/mtn", drive->devfs_name); - - g->number = devfs_register_tape(drive->devfs_name); g->fops = &idetape_block_ops; ide_register_region(g);