This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / drivers / scsi / scsicam.c
index d17702e..b78354f 100644 (file)
  */
 
 #include <linux/module.h>
-
 #include <linux/fs.h>
 #include <linux/genhd.h>
 #include <linux/kernel.h>
 #include <linux/blkdev.h>
 #include <linux/buffer_head.h>
 #include <asm/unaligned.h>
-#include "scsi.h"
-#include "hosts.h"
+
 #include <scsi/scsicam.h>
 
+
 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds,
                   unsigned int *secs);
 
@@ -30,10 +29,11 @@ unsigned char *scsi_bios_ptable(struct block_device *dev)
        unsigned char *res = kmalloc(66, GFP_KERNEL);
        if (res) {
                struct block_device *bdev = dev->bd_contains;
-               struct buffer_head *bh = __bread(bdev, 0, block_size(bdev));
-               if (bh) {
-                       memcpy(res, bh->b_data + 0x1be, 66);
-                       brelse(bh);
+               Sector sect;
+               void *data = read_dev_sector(bdev, 0, &sect);
+               if (data) {
+                       memcpy(res, data + 0x1be, 66);
+                       put_dev_sector(sect);
                } else {
                        kfree(res);
                        res = NULL;
@@ -41,6 +41,7 @@ unsigned char *scsi_bios_ptable(struct block_device *dev)
        }
        return res;
 }
+EXPORT_SYMBOL(scsi_bios_ptable);
 
 /*
  * Function : int scsicam_bios_param (struct block_device *bdev, ector_t capacity, int *ip)
@@ -94,6 +95,7 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
 
        return 0;
 }
+EXPORT_SYMBOL(scsicam_bios_param);
 
 /*
  * Function : static int scsi_partsize(unsigned char *buf, unsigned long 
@@ -175,6 +177,7 @@ int scsi_partsize(unsigned char *buf, unsigned long capacity,
        }
        return -1;
 }
+EXPORT_SYMBOL(scsi_partsize);
 
 /*
  * Function : static int setsize(unsigned long capacity,unsigned int *cyls,