Hello friends! I have reworked my patch that I sent a few days ago. I made huge mistakes in the previous patch but I hope this patch is perfect. --- a/drivers/ide/pci/via82cxxx.c 2005-11-29 14:45:00.000000000 +0100 +++ b/drivers/ide/pci/via82cxxx.c 2005-11-29 14:49:32.000000000 +0100 @@ -247,7 +247,7 @@ static struct via_isa_bridge *via_config u8 t; for (via_config = via_isa_bridges; via_config->id; via_config++) - if ((*isa = pci_find_device(PCI_VENDOR_ID_VIA + + if ((*isa = pci_get_device(PCI_VENDOR_ID_VIA + !!(via_config->flags & VIA_BAD_ID), via_config->id, NULL))) { @@ -255,6 +255,9 @@ static struct via_isa_bridge *via_config if (t >= via_config->rev_min && t <= via_config->rev_max) break; + + pci_dev_put(*isa); + *isa = NULL; } return via_config; @@ -360,6 +363,8 @@ static unsigned int __devinit init_chips via_dma[via_config->flags & VIA_UDMA], pci_name(dev)); + pci_dev_put(isa); + return 0; } @@ -430,6 +435,8 @@ static void __devinit init_hwif_via82cxx ide_set_hwifdata(hwif, vdev); vdev->via_config = via_config_find(&isa); + if (isa) + pci_dev_put(isa); via_cable_detect(hwif->pci_dev, vdev); hwif->autodma = 0;