add a gpio feature for devices supporting the generic GPIO interface
[openwrt.git] / target / linux / brcm47xx / patches-2.6.23 / 410-aec62xx_pci_enable.patch
1 diff -Naur a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
2 --- a/drivers/ide/pci/aec62xx.c 2007-10-12 18:43:44.000000000 +0200
3 +++ b/drivers/ide/pci/aec62xx.c 2007-11-14 14:12:51.000000000 +0100
4 @@ -248,7 +248,14 @@
5
6 static int __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
7 {
8 - unsigned long dma_base = pci_resource_start(dev, 4);
9 + unsigned long dma_base;
10 + int err;
11 +
12 + err = pci_enable_device(dev);
13 + if (err)
14 + return err;
15 +
16 + dma_base = pci_resource_start(dev, 4);
17
18 if (inb(dma_base + 2) & 0x10) {
19 d->name = (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R) ?
20 @@ -256,7 +263,11 @@
21 d->udma_mask = 0x7f; /* udma0-6 */
22 }
23
24 - return ide_setup_pci_device(dev, d);
25 + err = ide_setup_pci_device(dev, d);
26 + if(err)
27 + pci_disable_device(dev);
28 +
29 + return err;
30 }
31
32 static ide_pci_device_t aec62xx_chipsets[] __devinitdata = {
This page took 0.04602 seconds and 5 git commands to generate.