diff options
Diffstat (limited to 'drivers/ide/pci/slc90e66.c')
-rw-r--r-- | drivers/ide/pci/slc90e66.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index dbbb46819a2d..a6cf810c4699 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/slc90e66.c Version 0.19 Sep 24, 2007 | ||
3 | * | ||
4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> | 2 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> | 3 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> |
6 | * | 4 | * |
@@ -26,7 +24,7 @@ static DEFINE_SPINLOCK(slc90e66_lock); | |||
26 | static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) | 24 | static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) |
27 | { | 25 | { |
28 | ide_hwif_t *hwif = HWIF(drive); | 26 | ide_hwif_t *hwif = HWIF(drive); |
29 | struct pci_dev *dev = hwif->pci_dev; | 27 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
30 | int is_slave = drive->dn & 1; | 28 | int is_slave = drive->dn & 1; |
31 | int master_port = hwif->channel ? 0x42 : 0x40; | 29 | int master_port = hwif->channel ? 0x42 : 0x40; |
32 | int slave_port = 0x44; | 30 | int slave_port = 0x44; |
@@ -79,7 +77,7 @@ static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
79 | static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | 77 | static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) |
80 | { | 78 | { |
81 | ide_hwif_t *hwif = HWIF(drive); | 79 | ide_hwif_t *hwif = HWIF(drive); |
82 | struct pci_dev *dev = hwif->pci_dev; | 80 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
83 | u8 maslave = hwif->channel ? 0x42 : 0x40; | 81 | u8 maslave = hwif->channel ? 0x42 : 0x40; |
84 | int sitre = 0, a_speed = 7 << (drive->dn * 4); | 82 | int sitre = 0, a_speed = 7 << (drive->dn * 4); |
85 | int u_speed = 0, u_flag = 1 << drive->dn; | 83 | int u_speed = 0, u_flag = 1 << drive->dn; |
@@ -122,13 +120,14 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
122 | 120 | ||
123 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) | 121 | static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) |
124 | { | 122 | { |
123 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
125 | u8 reg47 = 0; | 124 | u8 reg47 = 0; |
126 | u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */ | 125 | u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */ |
127 | 126 | ||
128 | hwif->set_pio_mode = &slc90e66_set_pio_mode; | 127 | hwif->set_pio_mode = &slc90e66_set_pio_mode; |
129 | hwif->set_dma_mode = &slc90e66_set_dma_mode; | 128 | hwif->set_dma_mode = &slc90e66_set_dma_mode; |
130 | 129 | ||
131 | pci_read_config_byte(hwif->pci_dev, 0x47, ®47); | 130 | pci_read_config_byte(dev, 0x47, ®47); |
132 | 131 | ||
133 | if (hwif->dma_base == 0) | 132 | if (hwif->dma_base == 0) |
134 | return; | 133 | return; |