OSDN Git Service

uio: msm_sharedmem: Add stub shutdown function
authorAnant Goel <anantg@codeaurora.org>
Sat, 4 Aug 2018 06:12:17 +0000 (23:12 -0700)
committerAnant Goel <anantg@codeaurora.org>
Wed, 8 Aug 2018 01:04:35 +0000 (18:04 -0700)
A stub shutdown function is added as the default
implementation. This function is used by targets
that do not need to free their memory when the
driver is shutdown.

Change-Id: I073cda4fee7a1c6c34c5ba72d9ba73478ef2d90d
Signed-off-by: Anant Goel <anantg@codeaurora.org>
drivers/uio/msm_sharedmem/msm_sharedmem.c

index 84623c9..6336560 100644 (file)
@@ -75,6 +75,7 @@ static int sharedmem_mmap(struct uio_info *info, struct vm_area_struct *vma)
        return result;
 }
 
+#ifdef CONFIG_MSM_GVM_QUIN
 static void free_shared_ram_perms(u32 client_id, phys_addr_t addr, u32 size)
 {
        int ret;
@@ -92,6 +93,7 @@ static void free_shared_ram_perms(u32 client_id, phys_addr_t addr, u32 size)
                        &addr, size, ret);
        }
 }
+#endif
 
 /* Setup the shared ram permissions.
  * This function currently supports the mpss client only.
@@ -202,6 +204,7 @@ out:
        return ret;
 }
 
+#ifdef CONFIG_MSM_GVM_QUIN
 static void msm_sharedmem_shutdown(struct platform_device *pdev)
 {
        struct uio_info *info = dev_get_drvdata(&pdev->dev);
@@ -212,6 +215,11 @@ static void msm_sharedmem_shutdown(struct platform_device *pdev)
        free_shared_ram_perms(MPSS_RMTS_CLIENT_ID, shared_mem_addr,
                        shared_mem_size);
 }
+#else
+static void msm_sharedmem_shutdown(struct platform_device *pdev)
+{
+}
+#endif
 
 static int msm_sharedmem_remove(struct platform_device *pdev)
 {