Commit b65836f4 authored by Tomi Valkeinen's avatar Tomi Valkeinen Committed by Mauro Carvalho Chehab

media: ti-vpe: cal: cleanup phy iteration in cal_remove

Most of the driver has moved from ARRAY_SIZE(cal->phy) to
cal->data->num_csi2_phy, but we have one place left in cal_remove. Also,
checking for cal->phy[i] != NULL is not needed as we always have all the
phys instantiated.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 75e7e58b
......@@ -1188,10 +1188,8 @@ static int cal_remove(struct platform_device *pdev)
cal_media_unregister(cal);
for (i = 0; i < ARRAY_SIZE(cal->phy); i++) {
if (cal->phy[i])
cal_camerarx_disable(cal->phy[i]);
}
for (i = 0; i < cal->data->num_csi2_phy; i++)
cal_camerarx_disable(cal->phy[i]);
cal_media_cleanup(cal);
......
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