Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: mediatek: vcodec: add remove function for decoder platform driver

Need to disable decoder power when remove decoder hardware driver, adding
remove callback function in the definition of platform driver.

Fixes: c05bada35f01 ("media: mtk-vcodec: Add to support multi hardware decode")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Yunfei Dong and committed by
Mauro Carvalho Chehab
e2a10b38 9d2f13fb

+8
+8
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
··· 193 193 return ret; 194 194 } 195 195 196 + static int mtk_vdec_hw_remove(struct platform_device *pdev) 197 + { 198 + pm_runtime_disable(&pdev->dev); 199 + 200 + return 0; 201 + } 202 + 196 203 static struct platform_driver mtk_vdec_driver = { 197 204 .probe = mtk_vdec_hw_probe, 205 + .remove = mtk_vdec_hw_remove, 198 206 .driver = { 199 207 .name = "mtk-vdec-comp", 200 208 .of_match_table = mtk_vdec_hw_match,