libata: clean up read/set native_max address functions
authorTejun Heo <htejun@gmail.com>
Mon, 3 Sep 2007 03:32:30 +0000 (12:32 +0900)
committerJeff Garzik <jeff@garzik.org>
Fri, 12 Oct 2007 18:55:39 +0000 (14:55 -0400)
commitc728a9149f519cbb9f610962873f4e22ed4a6efd
treef739bd40345252ab7885ac6af63ca176d7f36000
parentdb6f8759d05d2082f09a45b5674edc0fb5e92b1b
libata: clean up read/set native_max address functions

Merge ata_read_native_max_addres_ext() into ata_read_native_max_address()
and combine ata_set_native_max_address_ext() and
ata_set_native_max_address() into ata_set_max_sectors().

* reduce duplicate code
* return 0 or -errno depending on error conditions
* report if command fails
* use ATA_LBA instead of 0x40

This is in preparation of ata_hpa_resize() update.

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