aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-acpi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:42 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:42 -0400
commit2f0d0fd2a605666d38e290c5c0d2907484352dc4 (patch)
tree43710e4dbd804be7f17ff6adc919b721d5565a97 /drivers/ide/ide-acpi.c
parent8b803bd184e3f6892284d4b50801b9ec85cd9b96 (diff)
ide-acpi: cleanup do_drive_get_GTF()
* ide_noacpi is already checked by ide_acpi_exec_tfs() which is the only user of do_drive_get_GTF(). * ide_acpi_exec_tfs() prints sufficient debug info about the device so no need to have excessive data about port/host. * It is sufficient to check for drive->acpidata->obj_handle as it will be NULL if dev == NULL or hwif->acpidata == NULL or device is not present. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-acpi.c')
-rw-r--r--drivers/ide/ide-acpi.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index ba5932d7b1bb..6b3123612f1c 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -219,39 +219,12 @@ static int do_drive_get_GTF(ide_drive_t *drive,
219 acpi_status status; 219 acpi_status status;
220 struct acpi_buffer output; 220 struct acpi_buffer output;
221 union acpi_object *out_obj; 221 union acpi_object *out_obj;
222 ide_hwif_t *hwif = drive->hwif;
223 struct device *dev = hwif->gendev.parent;
224 int err = -ENODEV; 222 int err = -ENODEV;
225 int port;
226 223
227 *gtf_length = 0; 224 *gtf_length = 0;
228 *gtf_address = 0UL; 225 *gtf_address = 0UL;
229 *obj_loc = 0UL; 226 *obj_loc = 0UL;
230 227
231 if (ide_noacpi)
232 return 0;
233
234 if (!dev) {
235 DEBPRINT("no PCI device for %s\n", hwif->name);
236 goto out;
237 }
238
239 if (!hwif->acpidata) {
240 DEBPRINT("no ACPI data for %s\n", hwif->name);
241 goto out;
242 }
243
244 port = hwif->channel ? drive->dn - 2: drive->dn;
245
246 DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n",
247 hwif->name, dev_name(dev), port, hwif->channel);
248
249 if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) {
250 DEBPRINT("%s drive %d:%d not present\n",
251 hwif->name, hwif->channel, port);
252 goto out;
253 }
254
255 if (!drive->acpidata->obj_handle) { 228 if (!drive->acpidata->obj_handle) {
256 DEBPRINT("No ACPI object found for %s\n", drive->name); 229 DEBPRINT("No ACPI object found for %s\n", drive->name);
257 goto out; 230 goto out;