Commit 5b635da1 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by James Bottomley

[SCSI] sd: Move scsi_disk() accessor function to sd.h

Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent aa91696e
...@@ -295,11 +295,6 @@ static int sd_major(int major_idx) ...@@ -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) static struct scsi_disk *__scsi_disk_get(struct gendisk *disk)
{ {
struct scsi_disk *sdkp = NULL; struct scsi_disk *sdkp = NULL;
......
...@@ -48,6 +48,11 @@ struct scsi_disk { ...@@ -48,6 +48,11 @@ struct scsi_disk {
}; };
#define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev) #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...) \ #define sd_printk(prefix, sdsk, fmt, a...) \
(sdsk)->disk ? \ (sdsk)->disk ? \
sdev_printk(prefix, (sdsk)->device, "[%s] " fmt, \ sdev_printk(prefix, (sdsk)->device, "[%s] " fmt, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment