aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/atiixp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-18 23:53:57 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-18 23:53:57 -0700
commit0702b30dd821ac8a4103ddbe545518713fdca9be (patch)
tree8ce0c9f5e58c5ccb99870505eecd139986caa05e /drivers/ide/atiixp.c
parentsparc64: Fix crash with /proc/iomem (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 (diff)
downloadlinux-dev-0702b30dd821ac8a4103ddbe545518713fdca9be.tar.xz
linux-dev-0702b30dd821ac8a4103ddbe545518713fdca9be.zip
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/ide/atiixp.c')
-rw-r--r--drivers/ide/atiixp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
index b2735d28f5cc..ecd1e62ca91a 100644
--- a/drivers/ide/atiixp.c
+++ b/drivers/ide/atiixp.c
@@ -52,7 +52,7 @@ static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio)
{
struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
unsigned long flags;
- int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
+ int timing_shift = (drive->dn ^ 1) * 8;
u32 pio_timing_data;
u16 pio_mode_data;
@@ -85,7 +85,7 @@ static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed)
{
struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
unsigned long flags;
- int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8;
+ int timing_shift = (drive->dn ^ 1) * 8;
u32 tmp32;
u16 tmp16;
u16 udma_ctl = 0;