diff options
| author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-10-04 16:28:18 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:46 -0400 |
| commit | badff03df7a005d13ea2ae8ddc2f5ec0cfc049e8 (patch) | |
| tree | 11f661e29c5991a9baf33382749ce9f8347da5cf | |
| parent | 70edb185dbaa8a9ec0d6f3e50bb5698a4e85ded6 (diff) | |
libata-core: Expose gtm methods for driver use
Talk to the dark side our driver has to, yes. Much misleading is the
data. Store it in a structure we do so that it may be parsed.
Signed-off-by: Alan Cox <alan@redhat.com>
--
Whats small, old and shouts phrases out of order across mountains ?
Yodla..
Signed-off-by: Jeff Garzik <jeff@garzik.org>
| -rw-r--r-- | drivers/ata/libata-acpi.c | 8 | ||||
| -rw-r--r-- | include/linux/libata.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 5ebbf16f3a..f862e07d92 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
| @@ -200,7 +200,7 @@ void ata_acpi_associate(struct ata_host *host) | |||
| 200 | * RETURNS: | 200 | * RETURNS: |
| 201 | * 0 on success, -ENOENT if _GTM doesn't exist, -errno on failure. | 201 | * 0 on success, -ENOENT if _GTM doesn't exist, -errno on failure. |
| 202 | */ | 202 | */ |
| 203 | static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) | 203 | int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) |
| 204 | { | 204 | { |
| 205 | struct acpi_buffer output = { .length = ACPI_ALLOCATE_BUFFER }; | 205 | struct acpi_buffer output = { .length = ACPI_ALLOCATE_BUFFER }; |
| 206 | union acpi_object *out_obj; | 206 | union acpi_object *out_obj; |
| @@ -244,6 +244,8 @@ static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) | |||
| 244 | return rc; | 244 | return rc; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | EXPORT_SYMBOL_GPL(ata_acpi_gtm); | ||
| 248 | |||
| 247 | /** | 249 | /** |
| 248 | * ata_acpi_stm - execute _STM | 250 | * ata_acpi_stm - execute _STM |
| 249 | * @ap: target ATA port | 251 | * @ap: target ATA port |
| @@ -257,7 +259,7 @@ static int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *gtm) | |||
| 257 | * RETURNS: | 259 | * RETURNS: |
| 258 | * 0 on success, -ENOENT if _STM doesn't exist, -errno on failure. | 260 | * 0 on success, -ENOENT if _STM doesn't exist, -errno on failure. |
| 259 | */ | 261 | */ |
| 260 | static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm) | 262 | int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm) |
| 261 | { | 263 | { |
| 262 | acpi_status status; | 264 | acpi_status status; |
| 263 | struct acpi_object_list input; | 265 | struct acpi_object_list input; |
| @@ -289,6 +291,8 @@ static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm) | |||
| 289 | return 0; | 291 | return 0; |
| 290 | } | 292 | } |
| 291 | 293 | ||
| 294 | EXPORT_SYMBOL_GPL(ata_acpi_stm); | ||
| 295 | |||
| 292 | /** | 296 | /** |
| 293 | * ata_dev_get_GTF - get the drive bootup default taskfile settings | 297 | * ata_dev_get_GTF - get the drive bootup default taskfile settings |
| 294 | * @dev: target ATA device | 298 | * @dev: target ATA device |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 84dfc23b9d..751aabc21a 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -929,6 +929,8 @@ enum { | |||
| 929 | /* libata-acpi.c */ | 929 | /* libata-acpi.c */ |
| 930 | #ifdef CONFIG_ATA_ACPI | 930 | #ifdef CONFIG_ATA_ACPI |
| 931 | extern int ata_acpi_cbl_80wire(struct ata_port *ap); | 931 | extern int ata_acpi_cbl_80wire(struct ata_port *ap); |
| 932 | int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm); | ||
| 933 | int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *stm); | ||
| 932 | #else | 934 | #else |
| 933 | static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } | 935 | static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } |
| 934 | #endif | 936 | #endif |
