[PATCH 3/3] sd: Move scsi_disk() accessor function to sd.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sd: Move scsi_disk() accessor function to sd.h

Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

---

diff -r 51000f654ef3 drivers/scsi/sd.c
--- a/drivers/scsi/sd.c	Sat Jan 26 02:00:13 2008 -0500
+++ b/drivers/scsi/sd.c	Sat Jan 26 02:01:55 2008 -0500
@@ -282,11 +282,6 @@ static int sd_major(int major_idx)
 		BUG();
 		return 0;	/* shut up gcc */
 	}
-}
-
-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)
diff -r 51000f654ef3 drivers/scsi/sd.h
--- a/drivers/scsi/sd.h	Sat Jan 26 02:00:13 2008 -0500
+++ b/drivers/scsi/sd.h	Sat Jan 26 02:01:55 2008 -0500
@@ -50,6 +50,11 @@ struct scsi_disk {
 
 extern void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *);
 
+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,		\

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux