I just broke the build :( Note that the cleanup function is a bit confused: ade_data was never set as drvdata, and calling drm_crtc_cleanup directly is a bug - this is called indirectly through drm_mode_config_cleanup, which calls into crtc->destroy, which already has the call to drm_crtc_cleanup. Which means we can just nuke it. Aside: I have no idea why this driver depends upon ARM64. It doesn't build warning-free on 32bit, but otherwise it's perfectly fine. Cc: Xinliang Liu <z.liuxinliang@xxxxxxxxxxxxx> Cc: Xinwei Kong <kong.kongxinwei@xxxxxxxxxxxxx> Cc: Chen Feng <puck.chen@xxxxxxxxxxxxx> Cc: Sean Paul <seanpaul@xxxxxxxxxxxx> Fixes: d25bcfb8c2e1 ("drm/hisilicon: Don't set drm_device->platformdev") Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx> --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 ++------- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 91188f33b1d9..c64c82cb7e71 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -991,7 +991,7 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx) static int ade_drm_init(struct platform_device *pdev) { - struct drm_device *drm_dev = platform_get_drvdata(dev); + struct drm_device *dev = platform_get_drvdata(pdev); struct ade_data *ade; struct ade_hw_ctx *ctx; struct ade_crtc *acrtc; @@ -1052,14 +1052,9 @@ static int ade_drm_init(struct platform_device *pdev) static void ade_drm_cleanup(struct platform_device *pdev) { - struct drm_device *drm_dev = platform_get_drvdata(dev); - struct ade_data *ade = platform_get_drvdata(pdev); - struct drm_crtc *crtc = &ade->acrtc.base; - - drm_crtc_cleanup(crtc); } const struct kirin_dc_ops ade_dc_ops = { .init = ade_drm_init, .cleanup = ade_drm_cleanup -; +}; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 6b0f9f6c16e1..b9b8c25da5e3 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev) kirin_drm_mode_config_init(dev); /* display controller init */ - ret = dc_ops->init(to_platform_device(dev)); + ret = dc_ops->init(to_platform_device(dev->dev)); if (ret) goto err_mode_config_cleanup; @@ -137,7 +137,7 @@ static int kirin_drm_kms_init(struct drm_device *dev) err_unbind_all: component_unbind_all(dev->dev, dev); err_dc_cleanup: - dc_ops->cleanup(dev); + dc_ops->cleanup(to_platform_device(dev->dev)); err_mode_config_cleanup: drm_mode_config_cleanup(dev); devm_kfree(dev->dev, priv); -- 2.8.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel