diff options
Diffstat (limited to 'drivers/staging/media/starfive/camss/stf-camss.c')
-rw-r--r-- | drivers/staging/media/starfive/camss/stf-camss.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/media/starfive/camss/stf-camss.c b/drivers/staging/media/starfive/camss/stf-camss.c index a587f860101a..fecd3e67c7a1 100644 --- a/drivers/staging/media/starfive/camss/stf-camss.c +++ b/drivers/staging/media/starfive/camss/stf-camss.c @@ -162,6 +162,12 @@ err_isp_unregister: static void stfcamss_unregister_devs(struct stfcamss *stfcamss) { + struct stf_capture *cap_yuv = &stfcamss->captures[STF_CAPTURE_YUV]; + struct stf_isp_dev *isp_dev = &stfcamss->isp_dev; + + media_entity_remove_links(&isp_dev->subdev.entity); + media_entity_remove_links(&cap_yuv->video.vdev.entity); + stf_isp_unregister(&stfcamss->isp_dev); stf_capture_unregister(stfcamss); } @@ -355,7 +361,7 @@ err_cleanup_notifier: * * Always returns 0. */ -static int stfcamss_remove(struct platform_device *pdev) +static void stfcamss_remove(struct platform_device *pdev) { struct stfcamss *stfcamss = platform_get_drvdata(pdev); @@ -364,8 +370,6 @@ static int stfcamss_remove(struct platform_device *pdev) media_device_cleanup(&stfcamss->media_dev); v4l2_async_nf_cleanup(&stfcamss->notifier); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct of_device_id stfcamss_of_match[] = { @@ -420,7 +424,7 @@ static const struct dev_pm_ops stfcamss_pm_ops = { static struct platform_driver stfcamss_driver = { .probe = stfcamss_probe, - .remove = stfcamss_remove, + .remove_new = stfcamss_remove, .driver = { .name = "starfive-camss", .pm = &stfcamss_pm_ops, |