Re: [RFC 4/7] soc: qcom: Add Shared Memory Manager driver

From: Kiran Padwal
Date: Tue Sep 30 2014 - 02:19:36 EST


Hi Bjorn,

On Tuesday 30 September 2014 06:04 AM, Bjorn Andersson wrote:
> The Shared Memory Manager driver implements an interface for allocating
> and accessing items in the memory area shared among all of the
> processors in a Qualcomm platform.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxxxxxx>
> ---

<snip>

> +
> +static int qcom_smem_probe(struct platform_device *pdev)
> +{
> + struct qcom_smem *smem;
> + struct resource *res;
> + size_t array_size;
> + int num_regions = 0;
> + int i;
> +
> + for (i = 0; i < pdev->num_resources; i++) {
> + res = &pdev->resource[i];
> +
> + if (resource_type(res) == IORESOURCE_MEM)
> + num_regions++;
> + }
> +
> + if (num_regions == 0) {
> + dev_err(&pdev->dev, "no smem regions specified\n");
> + return -EINVAL;
> + }
> +
> + array_size = num_regions * sizeof(struct smem_region);
> + smem = devm_kzalloc(&pdev->dev, sizeof(*smem) + array_size, GFP_KERNEL);
> + if (!smem)
> + return -ENOMEM;
> +
> + smem->dev = &pdev->dev;
> + smem->hwlock = of_hwspin_lock_request(pdev->dev.of_node, NULL);

Compilation breaks while I try to compile with this patch.
Do I missing anything? Below is the error I am getting,

drivers/soc/qcom/qcom_smem.c: In function ‘qcom_smem_probe’:
drivers/soc/qcom/qcom_smem.c:274:2: error: implicit declaration of function ‘of_hwspin_lock_request’ [-Werror=implicit-function-declaration]
smem->hwlock = of_hwspin_lock_request(pdev->dev.of_node, NULL)

Thanks,
--Kiran


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/