]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
libata-acpi: clean up ata_acpi_exec_tfs()
authorTejun Heo <htejun@gmail.com>
Mon, 14 May 2007 18:28:16 +0000 (03:28 +0900)
committerJeff Garzik <jeff@garzik.org>
Mon, 9 Jul 2007 16:17:31 +0000 (12:17 -0400)
commit4700c4bc9262a9e78f7197c4c41cc2be085d5276
tree2156bedcbcfdee5d22dfb0a43f71bd4813933b7e
parentfafbae87db88a73b166d3bc3294d209207f27056
libata-acpi: clean up ata_acpi_exec_tfs()

This patch cleans up ata_acpi_exec_tfs() and its friends.

* Rename taskfile_array to ata_acpi_gtf and make it __packed as it's
  used as argument to ACPI method, and use pointer to ata_acpi_gtf and
  number of taskfiles to represent _GTF taskfiles instead of a pointer
  casted into unsigned long and byte count.  This makes argument
  re-checking in do_drive_set_taskfiles() unnecessary.

* Pointer in void * not in unsigned long.

* Clean up do_drive_get_GTF() error handling and make
  do_drive_get_GTF() return number of taskfiles on success, 0 if _GTF
  doesn't exist or doesn't contain valid ata.  -errno on other errors.

* Remove superflous check for acpi->buffer.pointer.

* Update taskfile_load_raw() such that printed messages look similar
  to the messages printed by ata_eh_report().

* s/do_drive_get_GTF/ata_dev_get_GTF/
  s/do_drive_set_taskfiles/ata_dev_set_taskfiles/

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-acpi.c