Hello Sebastian,

Sebastian Reichel <[email protected]> 于2026年6月13日周六 02:01写道:

> There is no need to get the platform device just for setting up
> the driver data. Simplify the logic.
>
> Reviewed-by: Andy Yan <[email protected]>
> Signed-off-by: Sebastian Reichel <[email protected]>
> ---
>  drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
> b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
> index 0de822360c8d..35598ab9fe84 100644
> --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
> +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
> @@ -74,7 +74,6 @@ static const struct drm_encoder_helper_funcs
> dw_dp_encoder_helper_funcs = {
>
>  static int dw_dp_rockchip_bind(struct device *dev, struct device *master,
> void *data)
>  {
> -       struct platform_device *pdev = to_platform_device(dev);
>

           In patch 06/10, this is added back again. So is this change
really necessary?



>         const struct dw_dp_plat_data *plat_data;
>         struct drm_device *drm_dev = data;
>         struct rockchip_dw_dp *dp;
> @@ -87,7 +86,7 @@ static int dw_dp_rockchip_bind(struct device *dev,
> struct device *master, void *
>                 return -ENOMEM;
>
>         dp->dev = dev;
> -       platform_set_drvdata(pdev, dp);
> +       dev_set_drvdata(dev, dp);
>
>         plat_data = of_device_get_match_data(dev);
>         if (!plat_data)
>
> --
> 2.53.0
>
>
>

Reply via email to