diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3784af39557..ba84d8a3754 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -211,7 +211,7 @@ enum { ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ - ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ + ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */ /* struct ata_queued_cmd flags */ ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ @@ -653,7 +653,7 @@ struct ata_port { #ifdef CONFIG_ATA_ACPI acpi_handle acpi_handle; - struct ata_acpi_gtm acpi_gtm; + struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ #endif u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ }; @@ -939,10 +939,20 @@ enum { /* libata-acpi.c */ #ifdef CONFIG_ATA_ACPI +static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) +{ + if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID) + return &ap->__acpi_init_gtm; + return NULL; +} extern int ata_acpi_cbl_80wire(struct ata_port *ap); int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); #else +static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) +{ + return NULL; +} static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } #endif |