summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_platform.c')
-rw-r--r--drivers/ata/pata_platform.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index e89656bffa84..ee1605bfc29f 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -32,11 +32,9 @@ static int pio_mask = 1;
*/
static int pata_platform_set_mode(struct ata_port *ap, struct ata_device **unused)
{
- int i;
-
- for (i = 0; i < ATA_MAX_DEVICES; i++) {
- struct ata_device *dev = &ap->link.device[i];
+ struct ata_device *dev;
+ ata_link_for_each_dev(dev, &ap->link) {
if (ata_dev_enabled(dev)) {
/* We don't really care */
dev->pio_mode = dev->xfer_mode = XFER_PIO_0;