Remove all inclusions of <linux/config.h>
[pandora-kernel.git] / arch / um / drivers / ubd_kern.c
index c3e205b..f0b0668 100644 (file)
@@ -20,7 +20,6 @@
 #define MAJOR_NR UBD_MAJOR
 #define UBD_SHIFT 4
 
-#include "linux/config.h"
 #include "linux/module.h"
 #include "linux/blkdev.h"
 #include "linux/hdreg.h"
@@ -627,7 +626,6 @@ static int ubd_new_disk(int major, u64 size, int unit,
                        
 {
        struct gendisk *disk;
-       int err;
 
        disk = alloc_disk(1 << UBD_SHIFT);
        if(disk == NULL)
@@ -669,18 +667,15 @@ static int ubd_add(int n)
        if(dev->file == NULL)
                goto out;
 
-       if (ubd_open_dev(dev))
-               goto out;
-
        err = ubd_file_size(dev, &dev->size);
        if(err < 0)
-               goto out_close;
+               goto out;
 
        dev->size = ROUND_BLOCK(dev->size);
 
        err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]);
        if(err)
-               goto out_close;
+               goto out;
 
        if(fake_major != MAJOR_NR)
                ubd_new_disk(fake_major, dev->size, n,
@@ -692,8 +687,6 @@ static int ubd_add(int n)
                make_ide_entries(ubd_gendisk[n]->disk_name);
 
        err = 0;
-out_close:
-       ubd_close(dev);
 out:
        return err;
 }
@@ -874,7 +867,7 @@ int ubd_driver_init(void){
                return(0);
        }
        err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr,
-                            SA_INTERRUPT, "ubd", ubd_dev);
+                            IRQF_DISABLED, "ubd", ubd_dev);
        if(err != 0)
                printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err);
        return 0;
@@ -987,8 +980,6 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
        __u64 offset;
        int len;
 
-       if(req->rq_status == RQ_INACTIVE) return(1);
-
        /* This should be impossible now */
        if((rq_data_dir(req) == WRITE) && !dev->openflags.w){
                printk("Write attempted on readonly ubd device %s\n",
@@ -1208,7 +1199,7 @@ int open_ubd_file(char *file, struct openflags *openflags, int shared,
                }
        }
 
-       /* Succesful return case! */
+       /* Successful return case! */
        if(backing_file_out == NULL)
                return(fd);