aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:41 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:41 -0400
commit7ed5b157d9dff55bf477b4c8b4708d5d45476677 (patch)
treecbfd113108efd3b4d0b634f02ca8f09e99b7fdc7 /include/linux/ide.h
parent8cd3c605624035b7f57deb8894e17c5ba6d05b2e (diff)
ide: add ide_for_each_present_dev() iterator
* Add ide_for_each_present_dev() iterator and convert IDE code to use it. * Do some drive-by CodingStyle fixups in ide-acpi.c while at it. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index e7b787de5286..7ed395b4b891 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1609,6 +1609,10 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive)
1609#define ide_port_for_each_dev(i, dev, port) \ 1609#define ide_port_for_each_dev(i, dev, port) \
1610 for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) 1610 for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++)
1611 1611
1612#define ide_port_for_each_present_dev(i, dev, port) \
1613 for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) \
1614 if ((dev)->dev_flags & IDE_DFLAG_PRESENT)
1615
1612#define ide_host_for_each_port(i, port, host) \ 1616#define ide_host_for_each_port(i, port, host) \
1613 for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++) 1617 for ((i) = 0; ((port) = (host)->ports[i]) || (i) < MAX_HOST_PORTS; (i)++)
1614 1618