[PATCH v2 2/3] iommu/sound: Use component_match_add_of helper

Robin Murphy robin.murphy at arm.com
Tue Jan 3 13:01:07 UTC 2023


Hi Sean,

On 22/12/2022 11:37 pm, Sean Anderson wrote:
> Convert users of component_match_add_release with component_release_of
> and component_compare_of to component_match_add_of.
> 
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
> Acked-by: Mark Brown <broonie at kernel.org>
> ---
> 
> Changes in v2:
> - Split off from helper addition
> 
>   drivers/iommu/mtk_iommu.c    | 3 +--
>   drivers/iommu/mtk_iommu_v1.c | 3 +--
>   sound/soc/codecs/wcd938x.c   | 6 ++----
>   3 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index 2ab2ecfe01f8..483b7a9e4410 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -1079,8 +1079,7 @@ static int mtk_iommu_mm_dts_parse(struct device *dev, struct component_match **m
>   		}
>   		data->larb_imu[id].dev = &plarbdev->dev;
>   
> -		component_match_add_release(dev, match, component_release_of,
> -					    component_compare_of, larbnode);
> +		component_match_add_of(dev, match, larbnode);

I've long since given up trying to make sense of how the DRM tree works, 
but the conflicting change is definitely already in mainline:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=b5765a1b44bea9dfcae69c53ffeb4c689d0922a7

Thanks,
Robin.

>   	}
>   
>   	/* Get smi-(sub)-common dev from the last larb. */
> diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
> index 6e0e65831eb7..fb09ed6bf550 100644
> --- a/drivers/iommu/mtk_iommu_v1.c
> +++ b/drivers/iommu/mtk_iommu_v1.c
> @@ -672,8 +672,7 @@ static int mtk_iommu_v1_probe(struct platform_device *pdev)
>   		}
>   		data->larb_imu[i].dev = &plarbdev->dev;
>   
> -		component_match_add_release(dev, &match, component_release_of,
> -					    component_compare_of, larbnode);
> +		component_match_add_of(dev, &match, larbnode);
>   	}
>   
>   	platform_set_drvdata(pdev, data);
> diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
> index aca06a4026f3..2f8444e54083 100644
> --- a/sound/soc/codecs/wcd938x.c
> +++ b/sound/soc/codecs/wcd938x.c
> @@ -4474,8 +4474,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x,
>   	}
>   
>   	of_node_get(wcd938x->rxnode);
> -	component_match_add_release(dev, matchptr, component_release_of,
> -				    component_compare_of, wcd938x->rxnode);
> +	component_match_add_of(dev, matchptr, wcd938x->rxnode);
>   
>   	wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0);
>   	if (!wcd938x->txnode) {
> @@ -4483,8 +4482,7 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x,
>   		return -ENODEV;
>   	}
>   	of_node_get(wcd938x->txnode);
> -	component_match_add_release(dev, matchptr, component_release_of,
> -				    component_compare_of, wcd938x->txnode);
> +	component_match_add_of(dev, matchptr, wcd938x->txnode);
>   	return 0;
>   }
>   


More information about the dri-devel mailing list