uio: msm_sharedmem: Add stub shutdown function

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>
This commit is contained in:
Anant Goel 2018-08-03 23:12:17 -07:00
parent 42570c93ec
commit ca463d4e79

View 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)
{