[SCSI] sd: Move scsi_disk() accessor function to sd.h
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Jun 2008 15:22:41 +0000 (11:22 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jul 2008 13:22:31 +0000 (08:22 -0500)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sd.c
drivers/scsi/sd.h

index e19691f880b96a9e6ebe94113832bb8d6bca4a3e..71069d952dc76f8510ff6cf9e40bf8e422c63427 100644 (file)
@@ -295,11 +295,6 @@ static int sd_major(int major_idx)
        }
 }
 
-static inline struct scsi_disk *scsi_disk(struct gendisk *disk)
-{
-       return container_of(disk->private_data, struct scsi_disk, driver);
-}
-
 static struct scsi_disk *__scsi_disk_get(struct gendisk *disk)
 {
        struct scsi_disk *sdkp = NULL;
index 4f032d48cb6ec9a14b9dc2d0632981accfb0f592..03a3d45cfa4237c26a545c209e1e2c8e30a1903c 100644 (file)
@@ -48,6 +48,11 @@ struct scsi_disk {
 };
 #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev)
 
+static inline struct scsi_disk *scsi_disk(struct gendisk *disk)
+{
+       return container_of(disk->private_data, struct scsi_disk, driver);
+}
+
 #define sd_printk(prefix, sdsk, fmt, a...)                             \
         (sdsk)->disk ?                                                 \
        sdev_printk(prefix, (sdsk)->device, "[%s] " fmt,                \