Commit 38d87234 authored by Tejun Heo's avatar Tejun Heo
Browse files

[PATCH] libata: add dev->ap



Add dev->ap which points back to the port the device belongs to.  This
makes it unnecessary to pass @ap for silly reasons (e.g. printks).
Also, this change is necessary to accomodate later PM support which
will introduce ATA link inbetween port and device.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
parent a0ab51ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4749,6 +4749,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,

	for (i = 0; i < ATA_MAX_DEVICES; i++) {
		struct ata_device *dev = &ap->device[i];
		dev->ap = ap;
		dev->devno = i;
		dev->pio_mask = UINT_MAX;
		dev->mwdma_mask = UINT_MAX;
+1 −0
Original line number Diff line number Diff line
@@ -358,6 +358,7 @@ struct ata_host_stats {
};

struct ata_device {
	struct ata_port		*ap;
	u64			n_sectors;	/* size of device, if ATA */
	unsigned long		flags;		/* ATA_DFLAG_xxx */
	unsigned int		class;		/* ATA_DEV_xxx */