aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/pci/direct.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/pci/direct.c')
-rw-r--r--arch/i386/pci/direct.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c
index e3ac502bf2fb..99012b93bd12 100644
--- a/arch/i386/pci/direct.c
+++ b/arch/i386/pci/direct.c
@@ -245,7 +245,7 @@ static int __init pci_check_type2(void)
245 return works; 245 return works;
246} 246}
247 247
248static int __init pci_direct_init(void) 248void __init pci_direct_init(void)
249{ 249{
250 struct resource *region, *region2; 250 struct resource *region, *region2;
251 251
@@ -258,16 +258,16 @@ static int __init pci_direct_init(void)
258 if (pci_check_type1()) { 258 if (pci_check_type1()) {
259 printk(KERN_INFO "PCI: Using configuration type 1\n"); 259 printk(KERN_INFO "PCI: Using configuration type 1\n");
260 raw_pci_ops = &pci_direct_conf1; 260 raw_pci_ops = &pci_direct_conf1;
261 return 0; 261 return;
262 } 262 }
263 release_resource(region); 263 release_resource(region);
264 264
265 type2: 265 type2:
266 if ((pci_probe & PCI_PROBE_CONF2) == 0) 266 if ((pci_probe & PCI_PROBE_CONF2) == 0)
267 goto out; 267 return;
268 region = request_region(0xCF8, 4, "PCI conf2"); 268 region = request_region(0xCF8, 4, "PCI conf2");
269 if (!region) 269 if (!region)
270 goto out; 270 return;
271 region2 = request_region(0xC000, 0x1000, "PCI conf2"); 271 region2 = request_region(0xC000, 0x1000, "PCI conf2");
272 if (!region2) 272 if (!region2)
273 goto fail2; 273 goto fail2;
@@ -275,15 +275,10 @@ static int __init pci_direct_init(void)
275 if (pci_check_type2()) { 275 if (pci_check_type2()) {
276 printk(KERN_INFO "PCI: Using configuration type 2\n"); 276 printk(KERN_INFO "PCI: Using configuration type 2\n");
277 raw_pci_ops = &pci_direct_conf2; 277 raw_pci_ops = &pci_direct_conf2;
278 return 0; 278 return;
279 } 279 }
280 280
281 release_resource(region2); 281 release_resource(region2);
282 fail2: 282 fail2:
283 release_resource(region); 283 release_resource(region);
284
285 out:
286 return 0;
287} 284}
288
289arch_initcall(pci_direct_init);