aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-11-27 05:43:38 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-23 05:24:11 -0500
commitf8ab6d8e15a9b978f79aee794c263014c2959dfc (patch)
treeeccd9ed11d7ea437a3626861ba4aaaadde087f74 /drivers/ata
parente39eec13ff8c58520d77b5f977b1e0fa067fbd2c (diff)
ata_generic: unindent loop in generic_set_mode()
Unindent loop body in generic_set_mode(). This is to ease future change. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ata_generic.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 90329982bef7..fb5434c8ae6e 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -54,21 +54,22 @@ static int generic_set_mode(struct ata_link *link, struct ata_device **unused)
54 dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); 54 dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
55 55
56 ata_link_for_each_dev(dev, link) { 56 ata_link_for_each_dev(dev, link) {
57 if (ata_dev_enabled(dev)) { 57 if (!ata_dev_enabled(dev))
58 /* We don't really care */ 58 continue;
59 dev->pio_mode = XFER_PIO_0; 59
60 dev->dma_mode = XFER_MW_DMA_0; 60 /* We don't really care */
61 /* We do need the right mode information for DMA or PIO 61 dev->pio_mode = XFER_PIO_0;
62 and this comes from the current configuration flags */ 62 dev->dma_mode = XFER_MW_DMA_0;
63 if (dma_enabled & (1 << (5 + dev->devno))) { 63 /* We do need the right mode information for DMA or PIO
64 ata_id_to_dma_mode(dev, XFER_MW_DMA_0); 64 and this comes from the current configuration flags */
65 dev->flags &= ~ATA_DFLAG_PIO; 65 if (dma_enabled & (1 << (5 + dev->devno))) {
66 } else { 66 ata_id_to_dma_mode(dev, XFER_MW_DMA_0);
67 ata_dev_printk(dev, KERN_INFO, "configured for PIO\n"); 67 dev->flags &= ~ATA_DFLAG_PIO;
68 dev->xfer_mode = XFER_PIO_0; 68 } else {
69 dev->xfer_shift = ATA_SHIFT_PIO; 69 ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
70 dev->flags |= ATA_DFLAG_PIO; 70 dev->xfer_mode = XFER_PIO_0;
71 } 71 dev->xfer_shift = ATA_SHIFT_PIO;
72 dev->flags |= ATA_DFLAG_PIO;
72 } 73 }
73 } 74 }
74 return 0; 75 return 0;