]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/blkdev.h
Merge branch 'for-2.6.28' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / include / linux / blkdev.h
index bfc18e497c7f20e67a864f2fdf1abd6b7a3af1cc..a92d9e4ea96e1a0a5af66bf21c6dbf155674e418 100644 (file)
@@ -1012,10 +1012,21 @@ struct blk_integrity {
 
 extern int blk_integrity_register(struct gendisk *, struct blk_integrity *);
 extern void blk_integrity_unregister(struct gendisk *);
-extern int blk_integrity_compare(struct block_device *, struct block_device *);
+extern int blk_integrity_compare(struct gendisk *, struct gendisk *);
 extern int blk_rq_map_integrity_sg(struct request *, struct scatterlist *);
 extern int blk_rq_count_integrity_sg(struct request *);
 
+static inline
+struct blk_integrity *bdev_get_integrity(struct block_device *bdev)
+{
+       return bdev->bd_disk->integrity;
+}
+
+static inline struct blk_integrity *blk_get_integrity(struct gendisk *disk)
+{
+       return disk->integrity;
+}
+
 static inline int blk_integrity_rq(struct request *rq)
 {
        if (rq->bio == NULL)
@@ -1029,6 +1040,8 @@ static inline int blk_integrity_rq(struct request *rq)
 #define blk_integrity_rq(rq)                   (0)
 #define blk_rq_count_integrity_sg(a)           (0)
 #define blk_rq_map_integrity_sg(a, b)          (0)
+#define bdev_get_integrity(a)                  (0)
+#define blk_get_integrity(a)                   (0)
 #define blk_integrity_compare(a, b)            (0)
 #define blk_integrity_register(a, b)           (0)
 #define blk_integrity_unregister(a)            do { } while (0);