Skip to content

Commit

Permalink
[SCSI] sd: Move scsi_disk() accessor function to sd.h
Browse files Browse the repository at this point in the history
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed Jul 12, 2008
1 parent aa91696 commit 5b635da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions drivers/scsi/sd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down

0 comments on commit 5b635da

Please sign in to comment.