Commit 9230a4cc authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: via-camera: call viafb_pm_unregister in remove()

The power management hooks were never unregistered, which caused a
crash when unloading the module.
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent ba78170e
......@@ -1459,6 +1459,9 @@ static int viacam_remove(struct platform_device *pdev)
video_unregister_device(&cam->vdev);
v4l2_device_unregister(&cam->v4l2_dev);
#ifdef CONFIG_PM
viafb_pm_unregister(&viacam_pm_hooks);
#endif
free_irq(viadev->pdev->irq, cam);
via_sensor_power_release(cam);
v4l2_ctrl_handler_free(&cam->ctrl_handler);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment