libata: reimplement link iterator
authorTejun Heo <tj@kernel.org>
Thu, 31 Jul 2008 08:02:41 +0000 (17:02 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 29 Sep 2008 04:22:30 +0000 (00:22 -0400)
commitaadffb682cc5572f48cc24883681db65530bd284
tree24ab92ec9b0cdd9e6f4c0bf7a8a4c04635be03db
parent82ef04fb4c82542b3eda81cca461f0594ce9cd0b
libata: reimplement link iterator

Implement __ata_port_next_link() and reimplement
__ata_port_for_each_link() and ata_port_for_each_link() using it.
This removes relatively large inlined code and makes iteration easier
to extend.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
include/linux/libata.h