On 15/10/2025 06:57, Kumari Pallavi wrote:
>  static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>  {
>       struct device *rdev = &rpdev->dev;
> @@ -2291,6 +2319,22 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device 
> *rpdev)
>       const char *domain;
>       bool secure_dsp;
>       unsigned int vmids[FASTRPC_MAX_VMIDS];
> +     struct device_node *root;
> +     const struct of_device_id *match;
> +     const struct fastrpc_soc_data *soc_data = NULL;
> +
> +     root = of_find_node_by_path("/");
> +     if (!root)
> +             return -ENODEV;
> +
> +     match = of_match_node(qcom_soc_match_table, root);

This is really odd way of doing things. You want to check machine, not
some node. Use proper API for that.

OTOH, I don't understand why you are checking machine in the first
place. If your device is different, then please follow writing bindings
- it explains exactly this case here.

> +     of_node_put(root);
> +     if (!match || !match->data) {
> +              soc_data = &default_soc_data;
> +              dev_dbg(rdev, "no compatible SoC found at root node\n");
> +     } else {
> +              soc_data = match->data;
> +     }
>  


Best regards,
Krzysztof

Reply via email to