]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: nvmap: rename altalloc/altfree
authorKrishna Reddy <vdumpa@nvidia.com>
Wed, 9 Apr 2014 18:49:07 +0000 (11:49 -0700)
committerKrishna Reddy <vdumpa@nvidia.com>
Thu, 10 Apr 2014 05:07:18 +0000 (22:07 -0700)
rename altalloc/altfree to nvmap_altalloc/nvmap_altfree and
expose to all nvmap files.

Change-Id: I6a5d75563f4c5cffe162157fee4bafe1241b690b
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/394291
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Tested-by: Sri Krishna Chowdary <schowdary@nvidia.com>
drivers/video/tegra/nvmap/nvmap_handle.c
drivers/video/tegra/nvmap/nvmap_priv.h

index b8151b1663e573dd479c8fc919647cad581a92a2..171d39f74be1336ac2c0926d6bf553575bf2cad0 100644 (file)
@@ -66,7 +66,7 @@ u32 nvmap_max_handle_count;
  * the array is allocated using vmalloc. */
 #define PAGELIST_VMALLOC_MIN   (PAGE_SIZE)
 
-static inline void *altalloc(size_t len)
+void *nvmap_altalloc(size_t len)
 {
        if (len > PAGELIST_VMALLOC_MIN)
                return vmalloc(len);
@@ -74,7 +74,7 @@ static inline void *altalloc(size_t len)
                return kmalloc(len, GFP_KERNEL);
 }
 
-static inline void altfree(void *ptr, size_t len)
+void nvmap_altfree(void *ptr, size_t len)
 {
        if (!ptr)
                return;
@@ -132,7 +132,7 @@ void _nvmap_handle_free(struct nvmap_handle *h)
        for (i = page_index; i < nr_page; i++)
                __free_page(h->pgalloc.pages[i]);
 
-       altfree(h->pgalloc.pages, nr_page * sizeof(struct page *));
+       nvmap_altfree(h->pgalloc.pages, nr_page * sizeof(struct page *));
 
 out:
        kfree(h);
@@ -174,7 +174,7 @@ static int handle_page_alloc(struct nvmap_client *client,
        if (zero_memory)
                gfp |= __GFP_ZERO;
 
-       pages = altalloc(nr_page * sizeof(*pages));
+       pages = nvmap_altalloc(nr_page * sizeof(*pages));
        if (!pages)
                return -ENOMEM;
 
@@ -225,7 +225,7 @@ static int handle_page_alloc(struct nvmap_client *client,
 fail:
        while (i--)
                __free_page(pages[i]);
-       altfree(pages, nr_page * sizeof(*pages));
+       nvmap_altfree(pages, nr_page * sizeof(*pages));
        wmb();
        return -ENOMEM;
 }
index aa2b3e190e76cefc2962c8b459f09e9a4e837a7e..f77ac4ae2fe10861cde66a699c2fc774b71cf2d9 100644 (file)
@@ -441,4 +441,7 @@ int __nvmap_dmabuf_fd(struct nvmap_client *client,
 void nvmap_dmabuf_debugfs_init(struct dentry *nvmap_root);
 int nvmap_dmabuf_stash_init(void);
 
+void *nvmap_altalloc(size_t len);
+void nvmap_altfree(void *ptr, size_t len);
+
 #endif /* __VIDEO_TEGRA_NVMAP_NVMAP_H */