cpcihp_generic.c (f0eef25339f92f7cd4aeea23d9ae97987a5a1e82) | cpcihp_generic.c (33ae6ef26d65ef5d15e80d95a9df1252eaed93e8) |
---|---|
1/* 2 * cpcihp_generic.c 3 * 4 * Generic port I/O CompactPCI driver 5 * 6 * Copyright 2002 SOMA Networks, Inc. 7 * Copyright 2001 Intel San Luis Obispo 8 * Copyright 2000,2001 MontaVista Software Inc. --- 140 unchanged lines hidden (view full) --- 149 status = validate_parameters(); 150 if (status) 151 return status; 152 153 r = request_region(port, 1, "#ENUM hotswap signal register"); 154 if(!r) 155 return -EBUSY; 156 | 1/* 2 * cpcihp_generic.c 3 * 4 * Generic port I/O CompactPCI driver 5 * 6 * Copyright 2002 SOMA Networks, Inc. 7 * Copyright 2001 Intel San Luis Obispo 8 * Copyright 2000,2001 MontaVista Software Inc. --- 140 unchanged lines hidden (view full) --- 149 status = validate_parameters(); 150 if (status) 151 return status; 152 153 r = request_region(port, 1, "#ENUM hotswap signal register"); 154 if(!r) 155 return -EBUSY; 156 |
157 dev = pci_find_slot(bridge_busnr, PCI_DEVFN(bridge_slot, 0)); | 157 bus = pci_find_bus(0, bridge_busnr); 158 if (!bus) { 159 err("Invalid bus number %d", bridge_busnr); 160 return -EINVAL; 161 } 162 dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0)); |
158 if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { 159 err("Invalid bridge device %s", bridge); 160 return -EINVAL; 161 } 162 bus = dev->subordinate; | 163 if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { 164 err("Invalid bridge device %s", bridge); 165 return -EINVAL; 166 } 167 bus = dev->subordinate; |
168 pci_dev_put(dev); |
|
163 164 memset(&generic_hpc, 0, sizeof (struct cpci_hp_controller)); 165 generic_hpc_ops.query_enum = query_enum; 166 generic_hpc.ops = &generic_hpc_ops; 167 168 status = cpci_hp_register_controller(&generic_hpc); 169 if(status != 0) { 170 err("Could not register cPCI hotplug controller"); --- 53 unchanged lines hidden --- | 169 170 memset(&generic_hpc, 0, sizeof (struct cpci_hp_controller)); 171 generic_hpc_ops.query_enum = query_enum; 172 generic_hpc.ops = &generic_hpc_ops; 173 174 status = cpci_hp_register_controller(&generic_hpc); 175 if(status != 0) { 176 err("Could not register cPCI hotplug controller"); --- 53 unchanged lines hidden --- |