aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-acpi.c')
-rw-r--r--drivers/ata/libata-acpi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index c059f78ad944..0023ac4ff496 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -44,7 +44,8 @@ static void ata_acpi_associate_sata_port(struct ata_port *ap)
44{ 44{
45 acpi_integer adr = SATA_ADR(ap->port_no, NO_PORT_MULT); 45 acpi_integer adr = SATA_ADR(ap->port_no, NO_PORT_MULT);
46 46
47 ap->device->acpi_handle = acpi_get_child(ap->host->acpi_handle, adr); 47 ap->link.device->acpi_handle =
48 acpi_get_child(ap->host->acpi_handle, adr);
48} 49}
49 50
50static void ata_acpi_associate_ide_port(struct ata_port *ap) 51static void ata_acpi_associate_ide_port(struct ata_port *ap)
@@ -60,7 +61,7 @@ static void ata_acpi_associate_ide_port(struct ata_port *ap)
60 max_devices++; 61 max_devices++;
61 62
62 for (i = 0; i < max_devices; i++) { 63 for (i = 0; i < max_devices; i++) {
63 struct ata_device *dev = &ap->device[i]; 64 struct ata_device *dev = &ap->link.device[i];
64 65
65 dev->acpi_handle = acpi_get_child(ap->acpi_handle, i); 66 dev->acpi_handle = acpi_get_child(ap->acpi_handle, i);
66 } 67 }
@@ -182,10 +183,10 @@ static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm)
182 /* Buffers for id may need byteswapping ? */ 183 /* Buffers for id may need byteswapping ? */
183 in_params[1].type = ACPI_TYPE_BUFFER; 184 in_params[1].type = ACPI_TYPE_BUFFER;
184 in_params[1].buffer.length = 512; 185 in_params[1].buffer.length = 512;
185 in_params[1].buffer.pointer = (u8 *)ap->device[0].id; 186 in_params[1].buffer.pointer = (u8 *)ap->link.device[0].id;
186 in_params[2].type = ACPI_TYPE_BUFFER; 187 in_params[2].type = ACPI_TYPE_BUFFER;
187 in_params[2].buffer.length = 512; 188 in_params[2].buffer.length = 512;
188 in_params[2].buffer.pointer = (u8 *)ap->device[1].id; 189 in_params[2].buffer.pointer = (u8 *)ap->link.device[1].id;
189 190
190 input.count = 3; 191 input.count = 3;
191 input.pointer = in_params; 192 input.pointer = in_params;
@@ -226,7 +227,7 @@ static int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm)
226static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf, 227static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
227 void **ptr_to_free) 228 void **ptr_to_free)
228{ 229{
229 struct ata_port *ap = dev->ap; 230 struct ata_port *ap = dev->link->ap;
230 acpi_status status; 231 acpi_status status;
231 struct acpi_buffer output; 232 struct acpi_buffer output;
232 union acpi_object *out_obj; 233 union acpi_object *out_obj;
@@ -320,7 +321,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
320static int taskfile_load_raw(struct ata_device *dev, 321static int taskfile_load_raw(struct ata_device *dev,
321 const struct ata_acpi_gtf *gtf) 322 const struct ata_acpi_gtf *gtf)
322{ 323{
323 struct ata_port *ap = dev->ap; 324 struct ata_port *ap = dev->link->ap;
324 struct ata_taskfile tf, rtf; 325 struct ata_taskfile tf, rtf;
325 unsigned int err_mask; 326 unsigned int err_mask;
326 327
@@ -424,7 +425,7 @@ static int ata_acpi_exec_tfs(struct ata_device *dev)
424 */ 425 */
425static int ata_acpi_push_id(struct ata_device *dev) 426static int ata_acpi_push_id(struct ata_device *dev)
426{ 427{
427 struct ata_port *ap = dev->ap; 428 struct ata_port *ap = dev->link->ap;
428 int err; 429 int err;
429 acpi_status status; 430 acpi_status status;
430 struct acpi_object_list input; 431 struct acpi_object_list input;
@@ -519,7 +520,7 @@ void ata_acpi_on_resume(struct ata_port *ap)
519 520
520 /* schedule _GTF */ 521 /* schedule _GTF */
521 for (i = 0; i < ATA_MAX_DEVICES; i++) 522 for (i = 0; i < ATA_MAX_DEVICES; i++)
522 ap->device[i].flags |= ATA_DFLAG_ACPI_PENDING; 523 ap->link.device[i].flags |= ATA_DFLAG_ACPI_PENDING;
523} 524}
524 525
525/** 526/**
@@ -538,8 +539,8 @@ void ata_acpi_on_resume(struct ata_port *ap)
538 */ 539 */
539int ata_acpi_on_devcfg(struct ata_device *dev) 540int ata_acpi_on_devcfg(struct ata_device *dev)
540{ 541{
541 struct ata_port *ap = dev->ap; 542 struct ata_port *ap = dev->link->ap;
542 struct ata_eh_context *ehc = &ap->eh_context; 543 struct ata_eh_context *ehc = &ap->link.eh_context;
543 int acpi_sata = ap->flags & ATA_FLAG_ACPI_SATA; 544 int acpi_sata = ap->flags & ATA_FLAG_ACPI_SATA;
544 int rc; 545 int rc;
545 546