From: Martin K. Petersen Date: Wed, 25 Jun 2008 15:22:41 +0000 (-0400) Subject: [SCSI] sd: Move scsi_disk() accessor function to sd.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b635da11e3a6387172abd651d26d8ef54b1fbc7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SCSI] sd: Move scsi_disk() accessor function to sd.h Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e19691f880b9..71069d952dc7 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -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; diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 4f032d48cb6e..03a3d45cfa42 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h @@ -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, \