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

« back to all changes in this revision

Viewing changes to drivers/staging/vme/bridges/vme_ca91cx42.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:
516
516
        if (existing_size != 0) {
517
517
                iounmap(image->kern_base);
518
518
                image->kern_base = NULL;
519
 
                if (image->bus_resource.name != NULL)
520
 
                        kfree(image->bus_resource.name);
 
519
                kfree(image->bus_resource.name);
521
520
                release_resource(&image->bus_resource);
522
521
                memset(&image->bus_resource, 0, sizeof(struct resource));
523
522
        }
560
559
 
561
560
        return 0;
562
561
 
563
 
        iounmap(image->kern_base);
564
 
        image->kern_base = NULL;
565
562
err_remap:
566
563
        release_resource(&image->bus_resource);
567
564
err_resource:
624
621
 
625
622
        /*
626
623
         * Let's allocate the resource here rather than further up the stack as
627
 
         * it avoids pushing loads of bus dependant stuff up the stack
 
624
         * it avoids pushing loads of bus dependent stuff up the stack
628
625
         */
629
626
        retval = ca91cx42_alloc_resource(image, size);
630
627
        if (retval) {
1055
1052
                pci_attr = dest->private;
1056
1053
        }
1057
1054
 
1058
 
        /* Check we can do fullfill required attributes */
 
1055
        /* Check we can do fulfill required attributes */
1059
1056
        if ((vme_attr->aspace & ~(VME_A16 | VME_A24 | VME_A32 | VME_USER1 |
1060
1057
                VME_USER2)) != 0) {
1061
1058
 
1072
1069
                goto err_cycle;
1073
1070
        }
1074
1071
 
1075
 
        /* Check to see if we can fullfill source and destination */
 
1072
        /* Check to see if we can fulfill source and destination */
1076
1073
        if (!(((src->type == VME_DMA_PCI) && (dest->type == VME_DMA_VME)) ||
1077
1074
                ((src->type == VME_DMA_VME) && (dest->type == VME_DMA_PCI)))) {
1078
1075
 
1782
1779
 
1783
1780
        return 0;
1784
1781
 
1785
 
        vme_unregister_bridge(ca91cx42_bridge);
1786
1782
err_reg:
1787
1783
        ca91cx42_crcsr_exit(ca91cx42_bridge, pdev);
1788
1784
err_lm: