aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/arm/bast-ide.c2
-rw-r--r--drivers/ide/arm/ide_arm.c8
-rw-r--r--drivers/ide/cris/ide-cris.c4
-rw-r--r--drivers/ide/h8300/ide-h8300.c11
-rw-r--r--drivers/ide/ide-pnp.c11
-rw-r--r--drivers/ide/ide.c33
-rw-r--r--drivers/ide/legacy/buddha.c11
-rw-r--r--drivers/ide/legacy/falconide.c14
-rw-r--r--drivers/ide/legacy/gayle.c10
-rw-r--r--drivers/ide/legacy/ide-cs.c2
-rw-r--r--drivers/ide/legacy/macide.c29
-rw-r--r--drivers/ide/legacy/q40ide.c10
-rw-r--r--drivers/ide/pci/delkin_cb.c2
-rw-r--r--drivers/macintosh/mediabay.c3
-rw-r--r--include/linux/ide.h3
15 files changed, 86 insertions, 67 deletions
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c
index 48db6167bb90..45bf9c825f2b 100644
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -45,7 +45,7 @@ bastide_register(unsigned int base, unsigned int aux, int irq,
45 hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); 45 hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20);
46 hw.irq = irq; 46 hw.irq = irq;
47 47
48 ide_register_hw(&hw, NULL, 0, hwif); 48 ide_register_hw(&hw, NULL, hwif);
49 49
50 return 0; 50 return 0;
51} 51}
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c
index 8957cbadf5c2..1a03a2a285ef 100644
--- a/drivers/ide/arm/ide_arm.c
+++ b/drivers/ide/arm/ide_arm.c
@@ -26,10 +26,16 @@
26 26
27void __init ide_arm_init(void) 27void __init ide_arm_init(void)
28{ 28{
29 ide_hwif_t *hwif;
29 hw_regs_t hw; 30 hw_regs_t hw;
30 31
31 memset(&hw, 0, sizeof(hw)); 32 memset(&hw, 0, sizeof(hw));
32 ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206); 33 ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206);
33 hw.irq = IDE_ARM_IRQ; 34 hw.irq = IDE_ARM_IRQ;
34 ide_register_hw(&hw, NULL, 1, NULL); 35
36 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
37 if (hwif) {
38 ide_init_port_data(hwif, hwif->index);
39 ide_init_port_hw(hwif, &hw);
40 }
35} 41}
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index dcebc0299f5e..7e33e2b42e92 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -777,9 +777,11 @@ init_e100_ide (void)
777 ide_offsets, 777 ide_offsets,
778 0, 0, cris_ide_ack_intr, 778 0, 0, cris_ide_ack_intr,
779 ide_default_irq(0)); 779 ide_default_irq(0));
780 ide_register_hw(&hw, NULL, 1, &hwif); 780 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
781 if (hwif == NULL) 781 if (hwif == NULL)
782 continue; 782 continue;
783 ide_init_port_data(hwif, hwif->index);
784 ide_init_port_hw(hwif, &hw);
783 hwif->mmio = 1; 785 hwif->mmio = 1;
784 hwif->chipset = ide_etrax100; 786 hwif->chipset = ide_etrax100;
785 hwif->set_pio_mode = &cris_set_pio_mode; 787 hwif->set_pio_mode = &cris_set_pio_mode;
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c
index 4a49b5c59acb..57d0d4ce8588 100644
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -88,7 +88,7 @@ void __init h8300_ide_init(void)
88{ 88{
89 hw_regs_t hw; 89 hw_regs_t hw;
90 ide_hwif_t *hwif; 90 ide_hwif_t *hwif;
91 int idx; 91 int index;
92 92
93 if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300")) 93 if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300"))
94 goto out_busy; 94 goto out_busy;
@@ -100,14 +100,17 @@ void __init h8300_ide_init(void)
100 hw_setup(&hw); 100 hw_setup(&hw);
101 101
102 /* register if */ 102 /* register if */
103 idx = ide_register_hw(&hw, NULL, 1, &hwif); 103 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
104 if (idx == -1) { 104 if (hwif == NULL) {
105 printk(KERN_ERR "ide-h8300: IDE I/F register failed\n"); 105 printk(KERN_ERR "ide-h8300: IDE I/F register failed\n");
106 return; 106 return;
107 } 107 }
108 108
109 index = hwif->index;
110 ide_init_port_data(hwif, index);
111 ide_init_port_hw(hwif, &hw);
109 hwif_setup(hwif); 112 hwif_setup(hwif);
110 printk(KERN_INFO "ide%d: H8/300 generic IDE interface\n", idx); 113 printk(KERN_INFO "ide%d: H8/300 generic IDE interface\n", index);
111 return; 114 return;
112 115
113out_busy: 116out_busy:
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index e245521af7b5..664bc489c550 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -31,7 +31,6 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id
31{ 31{
32 hw_regs_t hw; 32 hw_regs_t hw;
33 ide_hwif_t *hwif; 33 ide_hwif_t *hwif;
34 int index;
35 34
36 if (!(pnp_port_valid(dev, 0) && pnp_port_valid(dev, 1) && pnp_irq_valid(dev, 0))) 35 if (!(pnp_port_valid(dev, 0) && pnp_port_valid(dev, 1) && pnp_irq_valid(dev, 0)))
37 return -1; 36 return -1;
@@ -41,10 +40,14 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id
41 pnp_port_start(dev, 1)); 40 pnp_port_start(dev, 1));
42 hw.irq = pnp_irq(dev, 0); 41 hw.irq = pnp_irq(dev, 0);
43 42
44 index = ide_register_hw(&hw, NULL, 1, &hwif); 43 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
44 if (hwif) {
45 u8 index = hwif->index;
46
47 ide_init_port_data(hwif, index);
48 ide_init_port_hw(hwif, &hw);
45 49
46 if (index != -1) { 50 printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index);
47 printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index);
48 pnp_set_drvdata(dev,hwif); 51 pnp_set_drvdata(dev,hwif);
49 return 0; 52 return 0;
50 } 53 }
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 98bd45e8c175..3ec220b64d0b 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(ide_hwifs);
116/* 116/*
117 * Do not even *think* about calling this! 117 * Do not even *think* about calling this!
118 */ 118 */
119static void init_hwif_data(ide_hwif_t *hwif, unsigned int index) 119void ide_init_port_data(ide_hwif_t *hwif, unsigned int index)
120{ 120{
121 unsigned int unit; 121 unsigned int unit;
122 122
@@ -159,6 +159,7 @@ static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
159 init_completion(&drive->gendev_rel_comp); 159 init_completion(&drive->gendev_rel_comp);
160 } 160 }
161} 161}
162EXPORT_SYMBOL_GPL(ide_init_port_data);
162 163
163static void init_hwif_default(ide_hwif_t *hwif, unsigned int index) 164static void init_hwif_default(ide_hwif_t *hwif, unsigned int index)
164{ 165{
@@ -210,7 +211,7 @@ static void __init init_ide_data (void)
210 /* Initialise all interface structures */ 211 /* Initialise all interface structures */
211 for (index = 0; index < MAX_HWIFS; ++index) { 212 for (index = 0; index < MAX_HWIFS; ++index) {
212 hwif = &ide_hwifs[index]; 213 hwif = &ide_hwifs[index];
213 init_hwif_data(hwif, index); 214 ide_init_port_data(hwif, index);
214 init_hwif_default(hwif, index); 215 init_hwif_default(hwif, index);
215#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI) 216#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI)
216 hwif->irq = 217 hwif->irq =
@@ -609,7 +610,7 @@ void ide_unregister(unsigned int index)
609 tmp_hwif = *hwif; 610 tmp_hwif = *hwif;
610 611
611 /* restore hwif data to pristine status */ 612 /* restore hwif data to pristine status */
612 init_hwif_data(hwif, index); 613 ide_init_port_data(hwif, index);
613 init_hwif_default(hwif, index); 614 init_hwif_default(hwif, index);
614 615
615 ide_hwif_restore(hwif, &tmp_hwif); 616 ide_hwif_restore(hwif, &tmp_hwif);
@@ -690,29 +691,19 @@ EXPORT_SYMBOL_GPL(ide_init_port_hw);
690 * ide_register_hw - register IDE interface 691 * ide_register_hw - register IDE interface
691 * @hw: hardware registers 692 * @hw: hardware registers
692 * @quirkproc: quirkproc function 693 * @quirkproc: quirkproc function
693 * @initializing: set while initializing built-in drivers
694 * @hwifp: pointer to returned hwif 694 * @hwifp: pointer to returned hwif
695 * 695 *
696 * Register an IDE interface, specifying exactly the registers etc. 696 * Register an IDE interface, specifying exactly the registers etc.
697 * Set init=1 iff calling before probes have taken place.
698 * 697 *
699 * Returns -1 on error. 698 * Returns -1 on error.
700 */ 699 */
701 700
702int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *), 701int ide_register_hw(hw_regs_t *hw, void (*quirkproc)(ide_drive_t *),
703 int initializing, ide_hwif_t **hwifp) 702 ide_hwif_t **hwifp)
704{ 703{
705 int index, retry = 1; 704 int index, retry = 1;
706 ide_hwif_t *hwif; 705 ide_hwif_t *hwif;
707 706 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
708 if (initializing) {
709 hwif = ide_find_port(hw->io_ports[IDE_DATA_OFFSET]);
710 if (hwif) {
711 index = hwif->index;
712 goto found;
713 }
714 return -1;
715 }
716 707
717 do { 708 do {
718 for (index = 0; index < MAX_HWIFS; ++index) { 709 for (index = 0; index < MAX_HWIFS; ++index) {
@@ -735,7 +726,7 @@ found:
735 if (hwif->present) 726 if (hwif->present)
736 ide_unregister(index); 727 ide_unregister(index);
737 else if (!hwif->hold) { 728 else if (!hwif->hold) {
738 init_hwif_data(hwif, index); 729 ide_init_port_data(hwif, index);
739 init_hwif_default(hwif, index); 730 init_hwif_default(hwif, index);
740 } 731 }
741 if (hwif->present) 732 if (hwif->present)
@@ -744,16 +735,14 @@ found:
744 ide_init_port_hw(hwif, hw); 735 ide_init_port_hw(hwif, hw);
745 hwif->quirkproc = quirkproc; 736 hwif->quirkproc = quirkproc;
746 737
747 if (initializing == 0) { 738 idx[0] = index;
748 u8 idx[4] = { index, 0xff, 0xff, 0xff };
749 739
750 ide_device_add(idx); 740 ide_device_add(idx);
751 }
752 741
753 if (hwifp) 742 if (hwifp)
754 *hwifp = hwif; 743 *hwifp = hwif;
755 744
756 return (initializing || hwif->present) ? index : -1; 745 return hwif->present ? index : -1;
757} 746}
758 747
759EXPORT_SYMBOL(ide_register_hw); 748EXPORT_SYMBOL(ide_register_hw);
@@ -1076,7 +1065,7 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
1076 ide_init_hwif_ports(&hw, (unsigned long) args[0], 1065 ide_init_hwif_ports(&hw, (unsigned long) args[0],
1077 (unsigned long) args[1], NULL); 1066 (unsigned long) args[1], NULL);
1078 hw.irq = args[2]; 1067 hw.irq = args[2];
1079 if (ide_register_hw(&hw, NULL, 0, NULL) == -1) 1068 if (ide_register_hw(&hw, NULL, NULL) == -1)
1080 return -EIO; 1069 return -EIO;
1081 return 0; 1070 return 0;
1082 } 1071 }
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c
index 4a0be251a05f..8b9cb39c961e 100644
--- a/drivers/ide/legacy/buddha.c
+++ b/drivers/ide/legacy/buddha.c
@@ -147,7 +147,7 @@ void __init buddha_init(void)
147{ 147{
148 hw_regs_t hw; 148 hw_regs_t hw;
149 ide_hwif_t *hwif; 149 ide_hwif_t *hwif;
150 int i, index; 150 int i;
151 151
152 struct zorro_dev *z = NULL; 152 struct zorro_dev *z = NULL;
153 u_long buddha_board = 0; 153 u_long buddha_board = 0;
@@ -213,8 +213,13 @@ fail_base2:
213 IRQ_AMIGA_PORTS); 213 IRQ_AMIGA_PORTS);
214 } 214 }
215 215
216 index = ide_register_hw(&hw, NULL, 1, &hwif); 216 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
217 if (index != -1) { 217 if (hwif) {
218 u8 index = hwif->index;
219
220 ide_init_port_data(hwif, index);
221 ide_init_port_hw(hwif, &hw);
222
218 hwif->mmio = 1; 223 hwif->mmio = 1;
219 printk("ide%d: ", index); 224 printk("ide%d: ", index);
220 switch(type) { 225 switch(type) {
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c
index 7d7936f1b900..b861cfe25900 100644
--- a/drivers/ide/legacy/falconide.c
+++ b/drivers/ide/legacy/falconide.c
@@ -66,15 +66,19 @@ void __init falconide_init(void)
66{ 66{
67 if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) { 67 if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) {
68 hw_regs_t hw; 68 hw_regs_t hw;
69 int index;
70 69
71 ide_setup_ports(&hw, ATA_HD_BASE, falconide_offsets, 70 ide_setup_ports(&hw, ATA_HD_BASE, falconide_offsets,
72 0, 0, NULL, 71 0, 0, NULL,
73// falconide_iops, 72// falconide_iops,
74 IRQ_MFP_IDE); 73 IRQ_MFP_IDE);
75 index = ide_register_hw(&hw, NULL, 1, NULL);
76 74
77 if (index != -1) 75 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
78 printk("ide%d: Falcon IDE interface\n", index); 76 if (hwif) {
79 } 77 u8 index = hwif->index;
78
79 ide_init_port_data(hwif, index);
80 ide_init_port_hw(hwif, &hw);
81
82 printk("ide%d: Falcon IDE interface\n", index);
83 }
80} 84}
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index 53331ee1e957..705d0b8a3f5d 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -133,7 +133,6 @@ found:
133 ide_ack_intr_t *ack_intr; 133 ide_ack_intr_t *ack_intr;
134 hw_regs_t hw; 134 hw_regs_t hw;
135 ide_hwif_t *hwif; 135 ide_hwif_t *hwif;
136 int index;
137 unsigned long phys_base, res_start, res_n; 136 unsigned long phys_base, res_start, res_n;
138 137
139 if (a4000) { 138 if (a4000) {
@@ -165,8 +164,13 @@ found:
165// &gayle_iops, 164// &gayle_iops,
166 IRQ_AMIGA_PORTS); 165 IRQ_AMIGA_PORTS);
167 166
168 index = ide_register_hw(&hw, NULL, 1, &hwif); 167 hwif = ide_find_port(base);
169 if (index != -1) { 168 if (hwif) {
169 u8 index = hwif->index;
170
171 ide_init_port_data(hwif, index);
172 ide_init_port_hw(hwif, &hw);
173
170 hwif->mmio = 1; 174 hwif->mmio = 1;
171 switch (i) { 175 switch (i) {
172 case 0: 176 case 0:
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 03715c058664..f4ea15b32969 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -153,7 +153,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq
153 hw.irq = irq; 153 hw.irq = irq;
154 hw.chipset = ide_pci; 154 hw.chipset = ide_pci;
155 hw.dev = &handle->dev; 155 hw.dev = &handle->dev;
156 return ide_register_hw(&hw, &ide_undecoded_slave, 0, NULL); 156 return ide_register_hw(&hw, &ide_undecoded_slave, NULL);
157} 157}
158 158
159/*====================================================================== 159/*======================================================================
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index 5c6aa77c2370..1840fede5216 100644
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -85,7 +85,6 @@ void __init macide_init(void)
85{ 85{
86 hw_regs_t hw; 86 hw_regs_t hw;
87 ide_hwif_t *hwif; 87 ide_hwif_t *hwif;
88 int index = -1;
89 88
90 switch (macintosh_config->ide_type) { 89 switch (macintosh_config->ide_type) {
91 case MAC_IDE_QUADRA: 90 case MAC_IDE_QUADRA:
@@ -93,40 +92,40 @@ void __init macide_init(void)
93 0, 0, macide_ack_intr, 92 0, 0, macide_ack_intr,
94// quadra_ide_iops, 93// quadra_ide_iops,
95 IRQ_NUBUS_F); 94 IRQ_NUBUS_F);
96 index = ide_register_hw(&hw, NULL, 1, &hwif);
97 break; 95 break;
98 case MAC_IDE_PB: 96 case MAC_IDE_PB:
99 ide_setup_ports(&hw, IDE_BASE, macide_offsets, 97 ide_setup_ports(&hw, IDE_BASE, macide_offsets,
100 0, 0, macide_ack_intr, 98 0, 0, macide_ack_intr,
101// macide_pb_iops, 99// macide_pb_iops,
102 IRQ_NUBUS_C); 100 IRQ_NUBUS_C);
103 index = ide_register_hw(&hw, NULL, 1, &hwif);
104 break; 101 break;
105 case MAC_IDE_BABOON: 102 case MAC_IDE_BABOON:
106 ide_setup_ports(&hw, BABOON_BASE, macide_offsets, 103 ide_setup_ports(&hw, BABOON_BASE, macide_offsets,
107 0, 0, NULL, 104 0, 0, NULL,
108// macide_baboon_iops, 105// macide_baboon_iops,
109 IRQ_BABOON_1); 106 IRQ_BABOON_1);
110 index = ide_register_hw(&hw, NULL, 1, &hwif); 107 break;
111 if (index == -1) break; 108 default:
112 if (macintosh_config->ident == MAC_MODEL_PB190) { 109 return;
110 }
113 111
112 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
113 if (hwif) {
114 u8 index = hwif->index;
115
116 ide_init_port_data(hwif, index);
117 ide_init_port_hw(hwif, &hw);
118
119 if (macintosh_config->ide_type == MAC_IDE_BABOON &&
120 macintosh_config->ident == MAC_MODEL_PB190) {
114 /* Fix breakage in ide-disk.c: drive capacity */ 121 /* Fix breakage in ide-disk.c: drive capacity */
115 /* is not initialized for drives without a */ 122 /* is not initialized for drives without a */
116 /* hardware ID, and we can't get that without */ 123 /* hardware ID, and we can't get that without */
117 /* probing the drive which freezes a 190. */ 124 /* probing the drive which freezes a 190. */
118 125 ide_drive_t *drive = &hwif->drives[0];
119 ide_drive_t *drive = &ide_hwifs[index].drives[0];
120 drive->capacity64 = drive->cyl*drive->head*drive->sect; 126 drive->capacity64 = drive->cyl*drive->head*drive->sect;
121
122 } 127 }
123 break;
124
125 default:
126 return;
127 }
128 128
129 if (index != -1) {
130 hwif->mmio = 1; 129 hwif->mmio = 1;
131 if (macintosh_config->ide_type == MAC_IDE_QUADRA) 130 if (macintosh_config->ide_type == MAC_IDE_QUADRA)
132 printk(KERN_INFO "ide%d: Macintosh Quadra IDE interface\n", index); 131 printk(KERN_INFO "ide%d: Macintosh Quadra IDE interface\n", index);
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c
index 6ea46a6723e2..31e54ffdfee4 100644
--- a/drivers/ide/legacy/q40ide.c
+++ b/drivers/ide/legacy/q40ide.c
@@ -115,7 +115,6 @@ void __init q40ide_init(void)
115{ 115{
116 int i; 116 int i;
117 ide_hwif_t *hwif; 117 ide_hwif_t *hwif;
118 int index;
119 const char *name; 118 const char *name;
120 119
121 if (!MACH_IS_Q40) 120 if (!MACH_IS_Q40)
@@ -141,10 +140,13 @@ void __init q40ide_init(void)
141 0, NULL, 140 0, NULL,
142// m68kide_iops, 141// m68kide_iops,
143 q40ide_default_irq(pcide_bases[i])); 142 q40ide_default_irq(pcide_bases[i]));
144 index = ide_register_hw(&hw, NULL, 1, &hwif); 143
145 // **FIXME** 144 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
146 if (index != -1) 145 if (hwif) {
146 ide_init_port_data(hwif, hwif->index);
147 ide_init_port_hw(hwif, &hw);
147 hwif->mmio = 1; 148 hwif->mmio = 1;
149 }
148 } 150 }
149} 151}
150 152
diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c
index 83829081640a..26aa492071bb 100644
--- a/drivers/ide/pci/delkin_cb.c
+++ b/drivers/ide/pci/delkin_cb.c
@@ -80,7 +80,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
80 hw.irq = dev->irq; 80 hw.irq = dev->irq;
81 hw.chipset = ide_pci; /* this enables IRQ sharing */ 81 hw.chipset = ide_pci; /* this enables IRQ sharing */
82 82
83 rc = ide_register_hw(&hw, &ide_undecoded_slave, 0, &hwif); 83 rc = ide_register_hw(&hw, &ide_undecoded_slave, &hwif);
84 if (rc < 0) { 84 if (rc < 0) {
85 printk(KERN_ERR "delkin_cb: ide_register_hw failed (%d)\n", rc); 85 printk(KERN_ERR "delkin_cb: ide_register_hw failed (%d)\n", rc);
86 pci_disable_device(dev); 86 pci_disable_device(dev);
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 48d647abea46..eaba4a9b231e 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -563,7 +563,8 @@ static void media_bay_step(int i)
563 ide_init_hwif_ports(&hw, (unsigned long) bay->cd_base, (unsigned long) 0, NULL); 563 ide_init_hwif_ports(&hw, (unsigned long) bay->cd_base, (unsigned long) 0, NULL);
564 hw.irq = bay->cd_irq; 564 hw.irq = bay->cd_irq;
565 hw.chipset = ide_pmac; 565 hw.chipset = ide_pmac;
566 bay->cd_index = ide_register_hw(&hw, NULL, 0, NULL); 566 bay->cd_index =
567 ide_register_hw(&hw, NULL, NULL);
567 pmu_resume(); 568 pmu_resume();
568 } 569 }
569 if (bay->cd_index == -1) { 570 if (bay->cd_index == -1) {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index de94a526ef9e..9c037a0f2af2 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -198,10 +198,11 @@ typedef struct hw_regs_s {
198} hw_regs_t; 198} hw_regs_t;
199 199
200struct hwif_s * ide_find_port(unsigned long); 200struct hwif_s * ide_find_port(unsigned long);
201void ide_init_port_data(struct hwif_s *, unsigned int);
201void ide_init_port_hw(struct hwif_s *, hw_regs_t *); 202void ide_init_port_hw(struct hwif_s *, hw_regs_t *);
202 203
203struct ide_drive_s; 204struct ide_drive_s;
204int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *), int, 205int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *),
205 struct hwif_s **); 206 struct hwif_s **);
206 207
207void ide_setup_ports( hw_regs_t *hw, 208void ide_setup_ports( hw_regs_t *hw,