sky2: version 1.27
[safe/jmp/linux-2.6] / drivers / block / ataflop.c
index 89a591d..a5af1d6 100644 (file)
@@ -1404,10 +1404,9 @@ static void redo_fd_request(void)
 
 repeat:
        if (!fd_request) {
-               fd_request = elv_next_request(floppy_queue);
+               fd_request = blk_fetch_request(floppy_queue);
                if (!fd_request)
                        goto the_end;
-               blkdev_dequeue_request(fd_request);
        }
 
        floppy = fd_request->rq_disk->private_data;
@@ -1479,10 +1478,7 @@ void do_fd_request(struct request_queue * q)
        stdma_lock(floppy_irq, NULL);
 
        atari_disable_irq( IRQ_MFP_FDC );
-       local_save_flags(flags);        /* The request function is called with ints
-       local_irq_disable();             * disabled... so must save the IPL for later */ 
        redo_fd_request();
-       local_irq_restore(flags);
        atari_enable_irq( IRQ_MFP_FDC );
 }
 
@@ -1628,7 +1624,7 @@ static int fd_ioctl(struct block_device *bdev, fmode_t mode,
                                drive, dtp->blocks, dtp->spt, dtp->stretch);
 
                /* sanity check */
-               if (!dtp || setprm.track != dtp->blocks/dtp->spt/2 ||
+               if (setprm.track != dtp->blocks/dtp->spt/2 ||
                    setprm.head != 2) {
                        redo_fd_request();
                        return -EINVAL;
@@ -1857,7 +1853,7 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
        return 0;
 }
 
-static struct block_device_operations floppy_fops = {
+static const struct block_device_operations floppy_fops = {
        .owner          = THIS_MODULE,
        .open           = floppy_open,
        .release        = floppy_release,