Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hpt366: use ATA_DMA_* constants

Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

authored by

Sergei Shtylyov and committed by
Bartlomiej Zolnierkiewicz
59c8d04f c018f1ee

+5 -5
+5 -5
drivers/ide/hpt366.c
··· 3 3 * Portions Copyright (C) 2001 Sun Microsystems, Inc. 4 4 * Portions Copyright (C) 2003 Red Hat Inc 5 5 * Portions Copyright (C) 2007 Bartlomiej Zolnierkiewicz 6 - * Portions Copyright (C) 2005-2008 MontaVista Software, Inc. 6 + * Portions Copyright (C) 2005-2009 MontaVista Software, Inc. 7 7 * 8 8 * Thanks to HighPoint Technologies for their assistance, and hardware. 9 9 * Special Thanks to Jon Burchmore in SanDiego for the deep pockets, his ··· 810 810 /* get DMA command mode */ 811 811 dma_cmd = inb(hwif->dma_base + ATA_DMA_CMD); 812 812 /* stop DMA */ 813 - outb(dma_cmd & ~0x1, hwif->dma_base + ATA_DMA_CMD); 813 + outb(dma_cmd & ~ATA_DMA_START, hwif->dma_base + ATA_DMA_CMD); 814 814 hpt370_clear_engine(drive); 815 815 } 816 816 ··· 827 827 ide_hwif_t *hwif = drive->hwif; 828 828 u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); 829 829 830 - if (dma_stat & 0x01) { 830 + if (dma_stat & ATA_DMA_ACTIVE) { 831 831 /* wait a little */ 832 832 udelay(20); 833 833 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); 834 - if (dma_stat & 0x01) 834 + if (dma_stat & ATA_DMA_ACTIVE) 835 835 hpt370_irq_timeout(drive); 836 836 } 837 837 return ide_dma_end(drive); ··· 853 853 854 854 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS); 855 855 /* return 1 if INTR asserted */ 856 - if (dma_stat & 4) 856 + if (dma_stat & ATA_DMA_INTR) 857 857 return 1; 858 858 859 859 return 0;