ide-acpi: cleanup do_drive_get_GTF()

Previous thread: ide: sanitize ACPI initialization by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:24 pm. (1 message)

Next thread: ide-acpi: cleanup do_drive_set_taskfiles() by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:24 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:24 pm

Gitweb:     http://git.kernel.org/linus/2f0d0fd2a605666d38e290c5c0d2907484352dc4
Commit:     2f0d0fd2a605666d38e290c5c0d2907484352dc4
Parent:     8b803bd184e3f6892284d4b50801b9ec85cd9b96
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Tue Mar 24 23:22:42 2009 +0100
Committer:  Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
CommitDate: Tue Mar 24 23:22:42 2009 +0100

    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>
---
 drivers/ide/ide-acpi.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index ba5932d..6b31236 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,
 	acpi_status			status;
 	struct acpi_buffer		output;
 	union acpi_object 		*out_obj;
-	ide_hwif_t			*hwif = drive->hwif;
-	struct device			*dev = hwif->gendev.parent;
 	int				err = -ENODEV;
-	int				port;
 
 	*gtf_length = 0;
 	*gtf_address = 0UL;
 	*obj_loc = 0UL;
 
-	if (ide_noacpi)
-		return 0;
-
-	if (!dev) {
-		DEBPRINT("no PCI device for %s\n", hwif->name);
-		goto out;
-	}
-
-	if (!hwif->acpidata) {
-		DEBPRINT("no ACPI data for %s\n", hwif->name);
-		goto out;
-	}
-
-	port = hwif->channel ? drive->dn - 2: drive->dn;
-
-	DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n",
-		 hwif->name, dev_name(dev), port, hwif->channel);
-
-	if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) {
-		DEBPRINT("%s drive %d:%d ...
Previous thread: ide: sanitize ACPI initialization by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:24 pm. (1 message)

Next thread: ide-acpi: cleanup do_drive_set_taskfiles() by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:24 pm. (1 message)