]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[PATCH] libata: add dev->ap
authorTejun Heo <htejun@gmail.com>
Mon, 15 May 2006 11:57:51 +0000 (20:57 +0900)
committerTejun Heo <htejun@gmail.com>
Mon, 15 May 2006 11:57:51 +0000 (20:57 +0900)
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: Tejun Heo <htejun@gmail.com>
drivers/scsi/libata-core.c
include/linux/libata.h

index 56f0af2083456425ff9ff0d5e17db7bf9bad5584..31b65e0da0b1a3651e5486862ee5d4c65ee73375 100644 (file)
@@ -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;
index cd467cd54473e60c66027cc335a6de07f41cd04c..ac2d2cc78b1073a05519233b5308e2ebd7a4cb98 100644 (file)
@@ -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 */