~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/x86/pci/direct.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
 
281
281
int __init pci_direct_probe(void)
282
282
{
283
 
        struct resource *region, *region2;
284
 
 
285
283
        if ((pci_probe & PCI_PROBE_CONF1) == 0)
286
284
                goto type2;
287
 
        region = request_region(0xCF8, 8, "PCI conf1");
288
 
        if (!region)
 
285
        if (!request_region(0xCF8, 8, "PCI conf1"))
289
286
                goto type2;
290
287
 
291
288
        if (pci_check_type1()) {
293
290
                port_cf9_safe = true;
294
291
                return 1;
295
292
        }
296
 
        release_resource(region);
 
293
        release_region(0xCF8, 8);
297
294
 
298
295
 type2:
299
296
        if ((pci_probe & PCI_PROBE_CONF2) == 0)
300
297
                return 0;
301
 
        region = request_region(0xCF8, 4, "PCI conf2");
302
 
        if (!region)
 
298
        if (!request_region(0xCF8, 4, "PCI conf2"))
303
299
                return 0;
304
 
        region2 = request_region(0xC000, 0x1000, "PCI conf2");
305
 
        if (!region2)
 
300
        if (!request_region(0xC000, 0x1000, "PCI conf2"))
306
301
                goto fail2;
307
302
 
308
303
        if (pci_check_type2()) {
311
306
                return 2;
312
307
        }
313
308
 
314
 
        release_resource(region2);
 
309
        release_region(0xC000, 0x1000);
315
310
 fail2:
316
 
        release_resource(region);
 
311
        release_region(0xCF8, 4);
317
312
        return 0;
318
313
}