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: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
75e7e58bfa
commit
b65836f40a
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue