soc: qcom: smem: Add inline function when SMEM is not enabled

Add inline function to fix compile issue when smem is called but not
enabled.

Change-Id: If31fc795fb5f42a1f221780d3d98e362766cca59
Signed-off-by: Cong Zhang <quic_congzhan@quicinc.com>
This commit is contained in:
Cong Zhang 2022-07-11 22:04:33 +08:00 committed by Gerrit - the friendly Code Review server
parent fa538cea6d
commit 75dda42eb8
2 changed files with 9 additions and 3 deletions

View File

@ -640,7 +640,7 @@ static void *qcom_smem_get_private(struct qcom_smem *smem,
* Looks up smem item and returns pointer to it. Size of smem
* item is returned in @size.
*/
void *qcom_smem_get(unsigned host, unsigned item, size_t *size)
void *qcom_smem_get(unsigned int host, unsigned int item, size_t *size)
{
struct smem_partition *part;
unsigned long flags;

View File

@ -5,8 +5,14 @@
#define QCOM_SMEM_HOST_ANY -1
int qcom_smem_alloc(unsigned host, unsigned item, size_t size);
void *qcom_smem_get(unsigned host, unsigned item, size_t *size);
#if IS_ENABLED(CONFIG_QCOM_SMEM)
void *qcom_smem_get(unsigned int host, unsigned int item, size_t *size);
#else
static inline void *qcom_smem_get(unsigned int host, unsigned int item, size_t *size)
{
return ERR_PTR(ENODEV);
}
#endif
int qcom_smem_get_free_space(unsigned host);
phys_addr_t qcom_smem_virt_to_phys(void *p);