aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-12-19 23:28:09 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 18:04:27 -0500
commit0948391641918b95d8d96c15089eb5ac156850b3 (patch)
tree8120c8b1eb2307ae13bddb62de1f4682c6c1cbc3 /drivers/ide
parentb718989da7cf1f77ed5665dba0d2c73bd9dfe2d7 (diff)
PCI: Remove users of pci_enable_device_bars()
This patch converts users of pci_enable_device_bars() to the new pci_enable_device_{io,mem} interface. The new API fits nicely, except maybe for the QLA case where a bit of code re-organization might be a good idea but I prefer sticking to the simple patch as I don't have hardware to test on. I'll also need some feedback on the cs5520 change. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/cs5520.c10
-rw-r--r--drivers/ide/setup-pci.c6
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 6ec00b8d7ec1..10adc49f80ca 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -156,8 +156,14 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
156 ide_setup_pci_noise(dev, d); 156 ide_setup_pci_noise(dev, d);
157 157
158 /* We must not grab the entire device, it has 'ISA' space in its 158 /* We must not grab the entire device, it has 'ISA' space in its
159 BARS too and we will freak out other bits of the kernel */ 159 * BARS too and we will freak out other bits of the kernel
160 if (pci_enable_device_bars(dev, 1<<2)) { 160 *
161 * pci_enable_device_bars() is going away. I replaced it with
162 * IO only enable for now but I'll need confirmation this is
163 * allright for that device. If not, it will need some kind of
164 * quirk. --BenH.
165 */
166 if (pci_enable_device_io(dev)) {
161 printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name); 167 printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name);
162 return -ENODEV; 168 return -ENODEV;
163 } 169 }
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 676c66e72881..cf79470a932d 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -240,7 +240,9 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise);
240 * @d: IDE port info 240 * @d: IDE port info
241 * 241 *
242 * Enable the IDE PCI device. We attempt to enable the device in full 242 * Enable the IDE PCI device. We attempt to enable the device in full
243 * but if that fails then we only need BAR4 so we will enable that. 243 * but if that fails then we only need IO space. The PCI code should
244 * have setup the proper resources for us already for controllers in
245 * legacy mode.
244 * 246 *
245 * Returns zero on success or an error code 247 * Returns zero on success or an error code
246 */ 248 */
@@ -250,7 +252,7 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
250 int ret; 252 int ret;
251 253
252 if (pci_enable_device(dev)) { 254 if (pci_enable_device(dev)) {
253 ret = pci_enable_device_bars(dev, 1 << 4); 255 ret = pci_enable_device_io(dev);
254 if (ret < 0) { 256 if (ret < 0) {
255 printk(KERN_WARNING "%s: (ide_setup_pci_device:) " 257 printk(KERN_WARNING "%s: (ide_setup_pci_device:) "
256 "Could not enable device.\n", d->name); 258 "Could not enable device.\n", d->name);