diff options
Diffstat (limited to 'drivers/ide/pci/triflex.c')
-rw-r--r-- | drivers/ide/pci/triflex.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index be8715dcee05..b6ff40336aa9 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -38,13 +38,12 @@ static void triflex_set_mode(ide_drive_t *drive, const u8 speed) | |||
38 | { | 38 | { |
39 | ide_hwif_t *hwif = HWIF(drive); | 39 | ide_hwif_t *hwif = HWIF(drive); |
40 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 40 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
41 | u8 channel_offset = hwif->channel ? 0x74 : 0x70; | ||
42 | u16 timing = 0; | ||
43 | u32 triflex_timings = 0; | 41 | u32 triflex_timings = 0; |
44 | u8 unit = (drive->select.b.unit & 0x01); | 42 | u16 timing = 0; |
45 | 43 | u8 channel_offset = hwif->channel ? 0x74 : 0x70, unit = drive->dn & 1; | |
44 | |||
46 | pci_read_config_dword(dev, channel_offset, &triflex_timings); | 45 | pci_read_config_dword(dev, channel_offset, &triflex_timings); |
47 | 46 | ||
48 | switch(speed) { | 47 | switch(speed) { |
49 | case XFER_MW_DMA_2: | 48 | case XFER_MW_DMA_2: |
50 | timing = 0x0103; | 49 | timing = 0x0103; |
@@ -114,7 +113,7 @@ static const struct pci_device_id triflex_pci_tbl[] = { | |||
114 | }; | 113 | }; |
115 | MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); | 114 | MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); |
116 | 115 | ||
117 | static struct pci_driver driver = { | 116 | static struct pci_driver triflex_pci_driver = { |
118 | .name = "TRIFLEX_IDE", | 117 | .name = "TRIFLEX_IDE", |
119 | .id_table = triflex_pci_tbl, | 118 | .id_table = triflex_pci_tbl, |
120 | .probe = triflex_init_one, | 119 | .probe = triflex_init_one, |
@@ -125,12 +124,12 @@ static struct pci_driver driver = { | |||
125 | 124 | ||
126 | static int __init triflex_ide_init(void) | 125 | static int __init triflex_ide_init(void) |
127 | { | 126 | { |
128 | return ide_pci_register_driver(&driver); | 127 | return ide_pci_register_driver(&triflex_pci_driver); |
129 | } | 128 | } |
130 | 129 | ||
131 | static void __exit triflex_ide_exit(void) | 130 | static void __exit triflex_ide_exit(void) |
132 | { | 131 | { |
133 | pci_unregister_driver(&driver); | 132 | pci_unregister_driver(&triflex_pci_driver); |
134 | } | 133 | } |
135 | 134 | ||
136 | module_init(triflex_ide_init); | 135 | module_init(triflex_ide_init); |