On Mon, Mar 31, 2025 at 05:28:45PM +0800, shao.ming...@zte.com.cn wrote:
> From: Tang Dongxing <tang.dongx...@zte.com.cn>
> 
> Remove the custom device comparison function compare_dev and replace it
> with the existing kernel helper component_compare_of
> 
> Signed-off-by: Tang Dongxing <tang.dongx...@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.ming...@zte.com.cn>
> ---
>  drivers/gpu/drm/adp/adp_drv.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/adp/adp_drv.c b/drivers/gpu/drm/adp/adp_drv.c
> index c98c647f981d..32350c1a5c1f 100644
> --- a/drivers/gpu/drm/adp/adp_drv.c
> +++ b/drivers/gpu/drm/adp/adp_drv.c
> @@ -551,11 +551,6 @@ static const struct component_master_ops adp_master_ops 
> = {
>       .unbind = adp_drm_unbind,
>  };
> 
> -static int compare_dev(struct device *dev, void *data)
> -{
> -     return dev->of_node == data;
> -}
> -
>  static int adp_probe(struct platform_device *pdev)
>  {
>       struct device_node *port;
> @@ -579,7 +574,7 @@ static int adp_probe(struct platform_device *pdev)
>       if (!port)
>               return -ENODEV;
> 
> -     drm_of_component_match_add(&pdev->dev, &match, compare_dev, port);
> +     drm_of_component_match_add(&pdev->dev, &match, component_compare_of, 
> port);
>       of_node_put(port);
> 
>       return component_master_add_with_match(&pdev->dev, &adp_master_ops, 
> match);

Reviewied-by: Janne Grunau <j...@jannau.net>

thanks,
Janne

Reply via email to